简体   繁体   中英

npm start problem: npm ERR! code ELIFECYCLE

I've got some problem with starting app by using 'npm start'. After create react files folder and using that command I can see:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! weatherapp@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the weatherapp@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I want to add that I've used react before. I was running code the same way but everything was good. What's the solution?

Make sure you are writing the npm start command to correct package where your package.json resides. More likely it seems you don't have react script installed. Can you try installing script with following command.

npm i react-scripts

This may solve your problem. Happy learning :)

Try to remove node_modules and package.log or yarn.lock file also. and run npm install again. Should solve your problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM