Push rejected, failed to compile Node.js app heroku

前端 未结 8 1043
面向向阳花
面向向阳花 2020-12-09 18:01

When I tried to push my nodejs app to heroku with git push heroku master, i got this:

Counting objects: 975, done.
Delta compression using up to         


        
8条回答
  •  没有蜡笔的小新
    2020-12-09 18:20

    Try setting a heroku-postbuild script to your package.json and make sure to include your engines.

    "scripts": {
            "heroku-postbuild": "npm run build"
        },
    "engines": {
            "npm": "5.6.0",
            "node": "8.10.0"
          }
    

    I would try and avoid force pushing anything at all costs whether it be to github or heroku.

提交回复
热议问题