Fail to deploy node.js application to heroku

后端 未结 5 1585
感动是毒
感动是毒 2020-12-10 03:52

I am trying to deploy a simple node.js express-based application to heroku, something which is apparently very basic: https://devcenter.heroku.com/articles/nodejs

He

5条回答
  •  隐瞒了意图╮
    2020-12-10 04:38

    I had this problem, and it was because:

    1. I keep node_modules in version control
    2. I had bin in my .gitignore file

    npm was attempting to chmod express/bin/express, but due to my .gitignore this file wasn't in git and thus was not being cloned during the deploy, so it failed. I didn't notice it because a local npm install would create the bin/express file as usual.

    Removing bin from .gitignore and committing the missing files solved the problem for me.

提交回复
热议问题