-2

This is my first code using node, it worked fined on locahost:3000 here is the error after I checked the log:

```2021-08-31T11:16:54.000000+00:00 app[api]: Build succeeded
2021-08-31T11:16:57.474525+00:00 heroku[web.1]: Starting process with command `npm start`
2021-08-31T11:16:59.311657+00:00 app[web.1]: npm ERR! missing script: start
2021-08-31T11:16:59.314538+00:00 app[web.1]: 
2021-08-31T11:16:59.314674+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-08-31T11:16:59.314721+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2021-08-31T11_16_59_312Z-debug.log
2021-08-31T11:16:59.351913+00:00 heroku[web.1]: Process exited with status 1
2021-08-31T11:16:59.406151+00:00 heroku[web.1]: State changed from starting to crashed
2021-08-31T11:17:31.920808+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=web-facebock.herokuapp.com request_id=a8bc0829-78b8-4ed9-93f4-c389ee0dcb39 fwd="197.210.77.72" dyno= connect= service= status=503 bytes= protocol=https
2021-08-31T11:17:32.247223+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=web-facebock.herokuapp.com request_id=d15e7971-6164-4dec-b761-0fd33b075dc4 fwd="197.210.76.123" dyno= connect= service= status=503 bytes= protocol=https```
  • can you provide some code? pkg.json for the start – Nikita Mazur Aug 31 '21 at 12:25
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Aug 31 '21 at 17:11

1 Answers1

1

Your package.json needs to contain:

"scripts": {
    "start": "node your-script.js"
}

Start script missing error when running npm start

this question was answered similarly with more details.

Liiaam93
  • 195
  • 1
  • 2
  • 10