-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning: Ignored package due to "Package subpath './package.json' is not defined by "exports"" #28710
Comments
Moving to metro repo |
@omonk how did you solve this? |
Hey @alfonsocj, I've not managed to solve it, it does seems to just work but not super comfortable with it. Do you have the same thing? |
Right. I have the exact same problem. |
I got sidetracked and haven't opened an issue in metro, I've found some other issues opened on the metro repo but nothing seems to of come from it: Initial discussion regarding module exports: ai/nanoevents#44 Does your import with the warning make it into the bundle? |
I do not see the warning after modifying metro.config.json. Everything seems to work fine. |
Out of curiosity which package is it that you're seeing this happen with? And which RN version? |
Reverting node to LTS fixed this for me. |
Should be fixed with i18next/i18next-http-backend@1d8da79#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R8 in v1.0.10 |
A workaround seems to be that every single module on However, especially since other bundlers like webpack and rollup, which also pull configuration from |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
I believe this should still be fixed through react-native-community/cli#1168 |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Description
I'm using i18next for translations, recently a backend connector for getting translation files was deprecated and replaced with a new package,
i18next-http-backend
.Initially firing up the app metro throws as it is unable to resolve
getFetch.cjs
, adding the follow to metro.config.js removes this error:Next, when firing up the app with
react-native start
with the new package the console shows a warning:Looking closer into the package.json I can see it's using the latest module resolution for cjs and esm environments.
However, loading up the app on xcode simulator, the relevant requests are performed correctly and the right translation files are downloaded without any issues.
Question is, where is the warning coming from and should we be concerned?
React Native version:
System:
OS: macOS 10.15.2
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 299.27 MB / 16.00 GB
Shell: 3.0.2 - /usr/local/bin/fish
Binaries:
Node: 13.13.0 - /usr/local/bin/node
Yarn: 1.22.4 - ~/.yarn/bin/yarn
npm: 6.14.4 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 27, 28
Build Tools: 28.0.3, 29.0.2, 30.0.0
System Images: android-29 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.6010548
Xcode: 11.4/11E146 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
> yarn add i18next-http-backend
> react-native start
, N.B. you wont need to import the package from anywhere, I assume this warning is produced from some sort of analysis of root package.json dependencies.warn Package i18next-http-backend has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in /path/to/app/node_modules/i18next-http-backend/package.json
Expected Results
No warning is shown in the console
Snack, code example, screenshot, or link to a repository:
i18next-http-backend
The text was updated successfully, but these errors were encountered: