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
Metro bundler fails if a package doesn't have "main" param in its package.json
"main" is not part of the spec for ESM module
I was trying to build my Expo React Native app, and I was stuck at some error like this:
Starting Metro Bundler
Error: While trying to resolve module `react-merge-refs` from file `/home/expo/workingdir/build/src/Hook/useDraggableScroll.ts`,
the package `/home/expo/workingdir/build/node_modules/react-merge-refs/package.json` was successfully found.
However, this package itself specifies a `main` module field that could not be resolved (`/home/expo/workingdir/build/node_modules/react-merge-refs/index`.
Indeed, none of these files exist:
I Added Blow line to the 'react-merge-refs' package.json in a fork and it fixed it. metro bundler should handle this
"main": "./dist/index.mjs",
Thanks and Regards
The text was updated successfully, but these errors were encountered:
Hello
Metro bundler fails if a package doesn't have "main" param in its package.json
I was trying to build my Expo React Native app, and I was stuck at some error like this:
I Added Blow line to the 'react-merge-refs' package.json in a fork and it fixed it.
metro bundler should handle this
Thanks and Regards
The text was updated successfully, but these errors were encountered: