Why do I obtain this error when deploying app to Heroku?

前端 未结 4 999
死守一世寂寞
死守一世寂寞 2020-12-02 17:40

I am getting some kind of error when deploying my app to heroku using git hub. The problem is, I don\'t understand the heroku logs and the entailing errors. Here is the hero

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-02 18:26

    You have to inform heroku where to start : missing script: start. In your package.json, you should have something like this:

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

    Where index.js is your entry point.

    As an alternative, you can specify in Procfile:

    web: node index.js
    

提交回复
热议问题