5

Trying to deploy a Node.js application to heroku but when using git push heroku master I get the following trace (only part of the whole trace is shown but it is the part which I believe to be the problem - if not let me know):

remote: -----> Build failed
remote:
remote:        We're sorry this build is failing! You can troubleshoot common issues here:
remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote:        Some possible problems:
remote:
remote:        - Dangerous semver range (>) in engines.node
remote:        https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
remote:
remote:        Love,
remote:        Heroku
remote:
remote:
remote:  !     Push rejected, failed to compile Node.js app

The package.json file works fine with other people's heroku, so that doesn't seem to be the problem.

Any ideas let me know.

Thanks

user3352349
  • 177
  • 2
  • 4
  • 16

2 Answers2

13

The issue is caused because you are trying to push with node version greater or less than what you installed. Do node -v

then replace the value of your installed node version with the one in your package.json.

https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version

sannimichaelse
  • 436
  • 5
  • 12
8

redo a

git add .
git commit -a -m'comment' 
git push 

plz ref

heroku push rejected failed to compile node.js app

Push rejected, failed to compile Node.js app heroku

Community
  • 1
  • 1
Aishwat Singh
  • 4,331
  • 2
  • 26
  • 48