5

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?

TheBokiya
  • 620
  • 6
  • 21

3 Answers3

24

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

TheBokiya
  • 620
  • 6
  • 21
  • 1
    This is so underrated. I lost 4 hours to find this and fix it. – Andrei Feb 29 '20 at 22:36
  • Sorry new developer question here, I heard some developers said it is better to turn it off for security purposes...is that good or bad for production or should I turn it off after development only? – Metono Sep 25 '20 at 12:39
  • 1
    @Metono I did see one of those posts and turn it off for security purposes, and that was what wasted me hours to fix. – TheBokiya Nov 13 '20 at 02:04
3

try putting npm run for scripts, just like

npm run start
prisar
  • 3,041
  • 2
  • 26
  • 27
0

I think it's just a bug. Try to run the command again to see if it works now. Or if the problem persist create another app and follow the instructions. Don't forget to checkout to the project directory as instructed: cd your_project_name. And another things: how did you create the app?

Fabien
  • 45
  • 5