This was working previously. But since I upgraded from node 4.6 to 6.5, When I do an npm start
, I end up with below error
Failed to build DependencyGraph: @providesModule naming collision:
Duplicate module name: String.prototype.es6
Paths: ...../node_modules/react-native/packager/react-packager/src/Resolver/polyfills/String.prototype.es6.js collides with ...../app/MallJell/nd/react-native/packager/react-packager/src/Resolver/polyfills/String.prototype.es6.js
This error is caused by a @providesModule declaration with the same name across two different files.
Error: @providesModule naming collision:
Duplicate module name: String.prototype.es6
Paths: ....../react-native/packager/react-packager/src/Resolver/polyfills/String.prototype.es6.js collides with ..../react-packager/src/Resolver/polyfills/String.prototype.es6.js
This error is caused by a @providesModule declaration with the same name across two different files.
at HasteMap._updateHasteMap (..../node_modules/react-native/packager/react-packager/src/node-haste/DependencyGraph/HasteMap.js:155:13)
at module.getName.then.name (.....node_modules/react-native/packager/react-packager/src/node-haste/DependencyGraph/HasteMap.js:115:31)
I'm just putting the answer that worked for you here so others can see it.
Remove the node_modules folder
rm -rf node_modules/
Then clean the npm cache and install the modules back
npm cache clean && npm install
Then run the packager again
npm start
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With