react-native: Invalid directory /Users/node_modules/react-native
I’m getting this error when I add react to an empty react-native project
Steps to reproduce:
react-native init test
Go to /test and edit add react (npm i --save react) or modify package json like this:
{
name: "test",
version: "0.0.1",
private: true,
scripts: {
start: "react-native start"
},
dependencies: {
react: "^0.14.3",
react-native: "^0.14.2"
}
}
Run the iOS project and I get the following error:
2015-11-23 11:33:19.073 [error][tid:main][RCTBatchedBridge.m:436] Error while loading: Unable to resolve module react-native from /Users/jonas/Development/3nit/myabi-native/myabi/index.ios.js: Invalid directory /Users/node_modules/react-native
2015-11-23
using node 5.0.0 on OS X El Capitan
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 24 (6 by maintainers)
Hey everyone, can you all try:
watchman watch-del-all
rm -rf $TMPDIR/react-packager-*
And let me know if that fixes the issue?