react-scripts: command not found
Run the npm install
react-scripts command to fix the react-scripts: command not found error.
If you need to delete your
node_modules folder and your
package_lock.json files, reinstall your dependencies, and restart your development server.
Run the following command in your terminal from your root directory.
This command will install all dependencies found in your
package.json files. If the installation command fails to execute, you can re-run the command using the
npm install --force
After installing dependencies, you can re run the npm start command.
If you are still having problems, try to specifically install the
npm install react-scripts
yarn add react-scripts
If the installation command fails to execute, you can re-run the command using the
npm install react-scripts --force
If the error is not resolved, try to delete your
package-lock.json files, re-run
npm install and restart your dev server.
delete node_modules and package-lock.json
rm -rf node_modules rm -f package-lock.json rm -f yarn.lock
clean npm cache and install
npm cache clean --force npm install
sh: react-scripts: command not found
Make sure the path to your project doesn’t contain any special characters.
react-scripts should not be installed globally or in your project’s devDependencies. It should be located in your
Or install the latest version of the package.
npm install react-scripts@latest react@latest react-dom@latest
yarn add react-scripts@latest react@latest react-dom@latest