Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Push rejected, failed to compile Node.js app heroku

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 2 threads.
Compressing objects: 100% (862/862), done.
Writing objects: 100% (975/975), 3.74 MiB | 80.00 KiB/s, done.
Total 975 (delta 70), reused 0 (delta 0)

-----> Node.js app detected
-----> Resolving engine versions
   Using Node.js version: 0.10.15
   Using npm version: 1.3.3
-----> Fetching Node.js binaries
-----> Vendoring node into slug
-----> Installing dependencies with npm
   npm ERR! install Couldn't read dependencies
!     Push rejected, failed to compile Node.js app

To [email protected]:hidden-reaches-9268.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:hidden-reaches-9268.git'

And this is my package.json:

{
  "name": "fnBoard",
  "version": "0.0.1",
  "private": true,
  "scripts": {
  "start": "node server.js"
},

  "dependencies": {
   "socket.io": "0.9.x"
},
   "engines": {
     "node": "0.10.x",
     "npm": "1.3.x"
   }
}

There's a bunch of error inside and I have no idea why this happen. please help. -thanks

like image 522
Pixeladed Avatar asked Sep 06 '13 14:09

Pixeladed


1 Answers

I am working in ReactJS and I am trying to deploy my project on Heroku server. At that time I have found same error like this:

Push rejected, failed to compile Node.js app.

enter image description here

Solution is:

If you use yarn:

git rm yarn.lock

git push heroku master

If you use npm:

git rm package-lock.json

git push heroku master

like image 67
Yogesh Borad Avatar answered Oct 30 '22 06:10

Yogesh Borad