xxxxxxxxxx
//install react-scripts
npm i react-scripts
xxxxxxxxxx
# delete the node_modules
rm -rf node_modules
# delete the package-lock.json or yarn.lock
rm -f package-lock.json
rm -f yarn.lock
# clean the npm cache
npm cache clean --force
# Install the dependencies
npm install
xxxxxxxxxx
To Solve sh: react-scripts: command not found Error Just try to install react-scripts with this command: npm i react-scripts And then try to run your project with npm start command Your error should be fixed now.
xxxxxxxxxx
# delete the node_modules
rm -rf node_modules
# delete the package-lock.json or yarn.lock
rm -f package-lock.json
rm -f yarn.lock
# clean the npm cache
npm cache clean --force
# Install the dependencies
npm install --force
or
npm install --legacy-peer-deps
xxxxxxxxxx
rm -rf node_modules 'Remove packages installed
npm install 'Install all packages
xxxxxxxxxx
"start": "NODE_ENV=production node_modules/react-scripts/bin/react-scripts.js start"
//Go to package.json and change "start": "react-scripts start" to the line above" and save the file.
//Try npm start again after this passage