Tom
Tom

Reputation: 69

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?

Upvotes: 3

Views: 13115

Answers (1)

jack
jack

Reputation: 2904

Use the command npm run start instead of npm start.

Upvotes: 3

Related Questions