Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js: How to set npm start?

I tried to use npm start to start my application. So I added the following line in my package.json file:

  "scripts": {
    "start": "node app.js"
  }

however, when I used npm start, I met with this problem: enter image description here

but when I used node app.js, it worked. So what's the problem?

like image 311
Tom Avatar asked Oct 24 '25 10:10

Tom


1 Answers

Use the command npm run start instead of npm start.

like image 88
jack Avatar answered Oct 26 '25 01:10

jack



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!