skip to Main Content

enter image description here(
npm ERR! Missing script: "start"
npm ERR!

)

I was installing react-router-dom and after installing it i used (npm start) and these errors occurred….

npm ERR! Missing script: "start"

This error is coming a lot frequently what is happening and how to tackle with it in the future??

2

Answers


  1. Go to package.json in your project directory and check does start appear in scripts:

    "scripts": {
        "start": "react-scripts start",
        ...
    }
    

    If not, add the script and try again. Also make sure you are in the correct working directory when you run npm start.

    Login or Signup to reply.
  2. I think may be launching npm start not from the folder where your package.json is. Be sure to open a terminal where your package.json is and then run npm start.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search