You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error/Warning in React Native with latest Beta: Package swr has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports"
#1310
Closed
beetlebum opened this issue
Jul 27, 2021
· 3 comments
· Fixed by #1313
Having just installed the latest version of swr "swr": "^1.0.0-beta.9" with React Native "react-native": "^0.64.2", the Metro Bundler shows the following warning: warn Package swr has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in /Users/.../node_modules/swr/package.json
Node version v16.5.0
The text was updated successfully, but these errors were encountered:
I'm playing react native with expo, didn't have see any warinings for it when I installed swr 1.0.0-beta.9.
IMO a library doesn't have to define package.json in exports if it's not necessary. Found a related issue of react-native cli itself here. Looks like it has some problem with resolving package.json. The issue is more like on react native cli side.
@beetlebum package.json exports is still added in #1313 since other bundler might also have this issue when resolving <module>/package.json. Will be released into next round. Thanks for reporting! 🙏
@beetlebum package.json exports is still added in #1313 since other bundler might also have this issue when resolving <module>/package.json. Will be released into next round. Thanks for reporting! 🙏
Having just installed the latest version of swr
"swr": "^1.0.0-beta.9"
with React Native"react-native": "^0.64.2"
, the Metro Bundler shows the following warning:warn Package swr has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in /Users/.../node_modules/swr/package.json
Node version v16.5.0
The text was updated successfully, but these errors were encountered: