Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'npm start' command doesn't do anything [duplicate]

I'm trying to start a react js project but the npm start command doesn't do anything. No error messages. No exceptions. Just nothing.

enter image description here

I already have a start script in the package.json file.

  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },

I've also checked for missing dependencies but nothing is missing.

Is there something I'm missing here?

like image 672
TheBokiya Avatar asked Nov 25 '19 09:11

TheBokiya


People also ask

Why my npm start command is not working?

You need to make sure that the package. json file is present from where you run the npm start command. When you don't see the package. json file, then run the pwd command to see if you are in the right directory.

What is the use of npm start command?

'npm start' is used for executing a startup script without typing its execution command.

Do you have to run npm start every time?

Nope, Anything you change over code, build will rerun for that change.


1 Answers

SOLUTION:

My npm ignore-scripts was set to true. So I set it to false and the npm start command works.

npm config set ignore-scripts false

To check if your ignore-scripts is true or false:

npm config get ignore-scripts

Thanks @RobC for the answer NPM run * doesn't do anything

like image 106
TheBokiya Avatar answered Sep 21 '22 21:09

TheBokiya