[Packager] "Requiring unknown module" error for module from package.json browser field
See original GitHub issueHi! After upgrading to the react-native@0.32 I am getting
in my project I am using https://github.com/yahoo/intl-messageformat, which has browser field in its package.json https://github.com/yahoo/intl-messageformat/blob/master/package.json#L31-L34, and while trying to require ./lib/locales
it fails.
Seems these https://github.com/facebook/react-native/pull/2208, https://github.com/facebook/node-haste/pull/77, https://github.com/facebook/node-haste/issues/62 related to my issue.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Requiring unknown module react-native - Stack Overflow
It sounds like you are missing the node_modules folder from your react native project directory. First steps are to check: Is the node_modules ......
Read more >@rollup/plugin-node-resolve - npm
A Rollup plugin which locates modules using the Node resolution ... of the package.json exports field to match when resolving modules.
Read more >Package exports - webpack
When the exports field is specified, only these module requests are available. Any other requests will lead to a ModuleNotFound Error.
Read more >Troubleshooting | React Navigation
If the module points to an npm package (i.e. the name of the module doesn't with ./ ), then it's probably due to...
Read more >rollup.js
Importing CommonJS · Publishing ES Modules ... If your package.json file also has a module field, ES-module-aware tools like Rollup and webpack 2+...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fixed with 5710b230a2a0f2b29553fbf94af5147a2e030f44
@gitim @davidaurelio how did u fix this? I have the same error
when I did a few corrections it shifter from module 3 to 4 in the same error
I tried this
"browser": { "crypto": false }, "react-native": { "crypto": false }
in my package.json but didnt work