I'm new to react, and I'm having a lot of trouble getting started. Here's a list of errors I run into in sequence:
- Run
npm install
on a package, thenreact-native run-ios
. Then error:
Command 'run-ios' unrecognized. Make sure that you have run 'npm install' and that you are inside a react-native project.
Run install the latest react-native (according to this question), which solves the problem.
Rerun the simulator. Error:
Cannot find entry file index.ios.js in any of the roots: ["/Users/Dan/ReactApp/node_modules/react-native/packager"
Run
kill -9 (process Id of server on 8081) && npm start
(according to this question)Next error:
Cannot read property 'ReactCurrentOwner' of undefined.
I remove node_module, run npm install, yarn add react-navigation (If I use npm to install this module, I'll go back to the first erorr again). according to this.
Back to 1.
- I give up and manually copy over my code to a new project.
This is incredibly frustrating. What am I doing wrong?
System Info:
- OS: OSX 10.12.6 Beta
- Simulator: iOS 10.3
- XCode: 8.3.3
- Node: 7.4.0
- Npm: 5.0.3
- React: 15.5.4
- React-Native: 0.45.0
- React-Native-Cli: 2.0.1