docker sh: react-scripts: not found 1

docker sh: react-scripts: not found

#If node_modules does not exist, run below to ensure all deps are downloaded.
npm install (or yarn) 

#Alternative Solution

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

Here is what the above code is Doing:
1. It’s checking if node_modules exists.
2. If it does, it removes it.
3. Then it runs npm install (or yarn).

Similar Posts