react-native, bundling failed react-native, bundling failed ios ios

react-native, bundling failed


It Usually happens if you try to install a module while your packager is open.

Try to delete node_modules folder and close the packager.Then reinstall everything by npm install in your project directory.


First close your JavaScript bundler (Metro bundler in my case) and restart the application. This will create fresh dependency graph. This should solve the issue.


Just restart the bundler - no need to delete the Node Modules folder

I came across this issue when adding and using react-native-elements when using VS Code and Android Studio emulator on Linux Mint

In VS Code I had a terminal running Expo with Metro Bundler via 'npm start' command. After installing the react-native-elements in the folder (using 'npm install --save react-native-elements') and adding the import into the .js file I got the "However, this package itself specifies a main module field that could not be resolved" error.

In my case, this just involved a ^C in the terminal session to stop the Metro bundler and then running 'npm start' again. There was no need to delete the node modules folder at all.