Author -  Sai gowtham

How to fix the react-scripts command not found Error

In this tutorial, we are going to learn about how to solve the sh: react-scripts: command not found error after running the npm start command.

When you are trying to run an npm start command on a cloned react project sometimes you probably see this type of error in your terminal.

sh: react-scripts: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! react-track@0.1.0 start: `react-scripts start`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the react-track@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/saigowtham/.npm/_logs/2020-07-26T23_40_42_563Z-debug.log

This error occurs due to a node_modules folder doesn’t present in your project or package-lock.json file is corrupted.

To fix this error, follow the below steps.

  1. First, delete the node_modules folder in your project (if you have one) using the below command.
rm -rf node_modules
  1. Delete the package-lock.json file.
rm -rf package-lock.json
  1. Install the project dependencies by running the following command.
npm install
  1. Now, try to start the development server again using the npm start command it will work successfully without any errors.
Compiled successfully!

You can now view react-track in the browser.

  Local:            http://localhost:3000
  On Your Network:  http://192.168.1.3:3000

Note that the development build is not optimized.
To create a production build, use npm run build.

Css Tutorials & Demos

How rotate an image continuously in CSS

In this demo, we are going to learn about how to rotate an image continuously using the css animations.

How to create a Instagram login Page

In this demo, i will show you how to create a instagram login page using html and css.

How to create a pulse animation in CSS

In this demo, i will show you how to create a pulse animation using css.

Creating a snowfall animation using css and JavaScript

In this demo, i will show you how to create a snow fall animation using css and JavaScript.

Top Udemy Courses

JavaScript - The Complete Guide 2023 (Beginner + Advanced)
JavaScript - The Complete Guide 2023 (Beginner + Advanced)
116,648 students enrolled
52 hours of video content
$14.99 FROM UDEMY
React - The Complete Guide (incl Hooks, React Router, Redux)
React - The Complete Guide (incl Hooks, React Router, Redux)
631,582 students enrolled
49 hours of video content
$24.99 FROM UDEMY
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
203,937 students enrolled
31.5 hours of video content
$14.99 FROM UDEMY