'I am having this ERR! code ELIFECYCLE error while running npm start locally?

I am newbie to React and trying to build my first React App. My App was running fine till last night. When I open my project in the morning and ran npm start or yarn start command, it gave me error - ERR! code ELIFECYCLE

I tried to close app and tried to run command again as per one of the solution given in the forum. But, that didn't work.

" *react-scripts start

'react-scripts' is not recognized as an internal or external command, operable program or batch file.

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! [email protected] start: react-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.

"*

Thank you in advance!



Solution 1:[1]

You're missing the react-scripts package. You need to do an npm install.

Solution 2:[2]

If npm install doesn't fix your problem it's probably because npm install is not able to properly complete the installation. Try this instead:

Delete the node_modules folder and delete the package-lock.json file or the yarn.lock file

Run npm install
Run npm i -S react-scripts
Run npm start

Good luck!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Soviut
Solution 2 Dama