HiveBrain v1.2.0
Get Started
← Back to all entries
patternreactCritical

sh: react-scripts: command not found after running npm start

Submitted by: @import:stackoverflow-api··
0
Viewed 0 times
runningnpmscriptsfoundstartreactafternotcommand

Problem

I cloned a react application onto my system and ran following commands

npm install -g create-react-app
npm install --save react react-dom


After that i ran

npm start


But it threw the above mentioned error, It is working fine on my other system from which i pushed it on github. But it is not working on any other system after cloning whether windows or mac.

Solution

Check if node_modules directory exists. After a fresh clone, there will very likely be no node_modules (since these are .gitignore'd).
Solution

run npm install (or yarn) to ensure all deps are downloaded.
Alternative Solution

If node_modules exists, remove it with rm -rf node_modules and then run npm install (or yarn).

Context

Stack Overflow Q#40546231, score: 715

Revisions (0)

No revisions yet.