1
votes

I want to learn React Native and start from [Facebook Github][1], So have installed the node.js V8.114 , then run below command on command prompt

npm install -g create-react-native-app

create-react-native-app AwesomeProject

cd AwesomeProject
npm start

Everything went right, but when I run the npm start , this error caused:

Error: React native is not installed. Please run npm install in your project directory. 16:36:21: Error starting packager: Error: Couldn't start project. Please fix the errors and restart the project. at C:\xdl\src\Project.js:1329:11 at Generator.next () at step (C:\Users\Riazati\AwesomeProject\node_modules\xdl\build\Project.js:1735:191) at C:\Users\Riazati\AwesomeProject\node_modules\xdl\build\Project.js:1735:361 at npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: react-native-scripts start npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Can anyone help me?

4
It is recommended to use yarn with react, much quicker and reliable with react. If you already installed yarn then use yarn start. If there is still error then yarn install. - SGhaleb

4 Answers

0
votes

Make sure you npm is updated npm install -g npm@latest delete the folder, then re-run the build process

0
votes

Try running npm install, like the error message tells you to.

0
votes

Once you cd to the project try running ‘npm install’ or ‘yarn’ then you could try running ‘react-native run-ios’ or ‘react-native run-android’

0
votes

Deleting node modules and then run npm install or yarn install worked for me!! Cheers.