sh: react-scripts: command not found after running npm start
Tried all of the above and nothing worked so I used npm i react-scripts
and it worked
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
).