React native packager fails on node 6.5 -


this working previously. since upgraded node 4.6 6.5, when npm start, end below error

failed 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 ...../app/malljell/nd/react-native/packager/react-packager/src/resolver/polyfills/string.prototype.es6.js  error caused @providesmodule declaration same name across 2 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 ..../react-packager/src/resolver/polyfills/string.prototype.es6.js  error caused @providesmodule declaration same name across 2 different files.     @ hastemap._updatehastemap (..../node_modules/react-native/packager/react-packager/src/node-haste/dependencygraph/hastemap.js:155:13)     @ module.getname.then.name (.....node_modules/react-native/packager/react-packager/src/node-haste/dependencygraph/hastemap.js:115:31) 

i'm putting answer worked here others can see it.

remove node_modules folder

rm -rf node_modules/ 

then clean npm cache , install modules back

npm cache clean && npm install 

then run packager again

npm start 

Comments