Error: jest-haste-map: @providesModule naming collision when using a local dependency

纵饮孤独 提交于 2019-12-01 06:26:46
Thakur Anil
watchman watch-del-all

rm -rf node_modules && npm install

rm -fr $TMPDIR/react-*
npm cache clean
npm start -- --reset-cache

for more check out here

Faced same issue Resolved it !!

All the npm packages in project have node modules. Make sure that node_modules directory inside packages should not include already present node module.

In my case react-native was present in node_modules of my project as well as node_modules of another forked library.

As the library was forked, I could remove node_modules directory from it and the issue got resolved.

I respond myself.

As a temporary solution, and given putting the dependencies in peerDependencies didn't work either, I've put the react and react-native in devDependencies of the react-native-services package.

I also got the same error. I tried below steps, its works like a charming.

Please remove all react-native specific folders from "%appdata%\Temp" and then try below commands:

rimraf node_modules
npm cache clean --force
npm install
rm -rf ios/build

Change /Users/Jebasuthan/XcodeProject/Game/ios/Pods/React/package.json to something else

non recursive

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!