Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

heroku for node: ! Heroku push rejected, no Cedar-supported app detected

I am new to heroku and express.js. I try to go through the tutorial, but I cannot make it with the step 'git push heroku master'. I followed the tutorial exactly. Below is the error message:

Counting objects: 269, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (241/241), done.
Writing objects: 100% (269/269), 188.93 KiB, done.
Total 269 (delta 9), reused 0 (delta 0)
 !     Heroku push rejected, no Cedar-supported app detected

To [email protected]:cryptic-journey-9914.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:cryptic-journey-9914.git'
like image 782
David Avatar asked Dec 18 '12 04:12

David


3 Answers

did you read the Getting Started with Node.js on Heroku article on Heroku Dev Center?

You need to declare your process type with Procfile. To do so, create a file named Procfile, with the following content:

web: node web.js

assume that your javascript file is called web.js.

p.s. don't forget to add the Procfile to git and commit it.

like image 153
howanghk Avatar answered Nov 12 '22 02:11

howanghk


You need a package.json file (and a Procfile), it is likely not the case.

like image 7
mpm Avatar answered Nov 12 '22 01:11

mpm


I have encountered this issue a few time before and it was because I was trying to push a remote branch to heroku.

To solve the problem, instead of using:

git push heroku master

I used:

git push heroku my-branch:master

This pushes the remote branch my-branch in the git repository to the master branch of heroku.

like image 2
Cory Avatar answered Nov 12 '22 03:11

Cory