Error sh: react-scripts: command not found in Reactjs
Hello devs, I have a project with Reactjs. I created the project by using the command :
npx create-react-app bookshop cd bookshop npm start
The project started and run well for me. I pushed code into Github and today I clone the project into my laptop. After running
npm install command I ran
npm start command but I got an error sh: react-scripts: command not found.
sh: react-scripts: command not found error file sh error code ELIFECYCLE error errno ENOENT error syscall spawn error start: `react-scripts start` error spawn ENOENT
How can I fix it?
Thanks in advance.
shruti sarva May 14 2022
Maybe you need install
react-scriptsagain, run command below:
npm i react-scripts
yarn add react-scripts
P May 14 2022
I had the same error, you can try as below to solve your issue:
Step 1: remove
node_modulesfolder by using
rm -rf node_modulescommand.
Step 2: Remove the
Step 3: Run
It really worked for me.