欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Unable to resolve module ReactDefaultPerf from

程序员文章站 2022-07-14 15:50:56
...

package.json信息如下:

"react": "^15.1.0",

"react-native": "^0.26.2"

 

运行后报错如下:

Unable to resolve module ReactDefaultPerf from /Users/Eric/Projects/HRONE/node_modules/react-native/Libraries/react-native/react-native.js: Unable to find this module in its module map or any of the node_modules directories under /Users/node_modules/ReactDefaultPerf and its parent directories

 

This might be related to https://github.com/facebook/react-native/issues/4968

To resolve try the following:

  1. Clear watchman watches: `watchman watch-del-all`.

  2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.

  3. Reset packager cache: `rm -fr $TMPDIR/react-*` or `npm start -- --reset-cache`.

 

解决办法:

"react": "15.0.2",

"react-native": "^0.26.2"

相关标签: react iOS