Home > Back-end >  Heroku throws npm ERR! Missing script: "start" at me
Heroku throws npm ERR! Missing script: "start" at me

Time:05-22

I am trying to deploy simple app on Heroku but it seems to be crashing with this errors.

I have included

    "start": "node app.js",

And web: node app.js in Procfile but it doesn't seem to help at all, I just get more errors.

Any idea what that might be?

Error log:

enter image description here

CodePudding user response:

In your package.json folder, under "scripts", you have to add the code you listed. It should look like this:

"scripts": {
     "test": "echo \"Error: no test specified\" && exit 1",
     "start": "node app.js"  // your code
},
  • Related