Reputation: 1259
I'm trying to deploying my 3d game (created using three.js) on heroku server. But after a command "git push heroku master" I get the following problem:
Initializing repository, done.
Counting objects: 252, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (251/251), done.
Writing objects: 100% (252/252), 2.38 MiB | 89.00 KiB/s, done.
Total 252 (delta 55), reused 0 (delta 0)
-----> Removing .DS_Store files
! Push rejected, no Cedar-supported app detected
To [email protected]:infinite-woodland-7676.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:infinite-woodland-7676.git'
Link to repository --> https://github.com/mkkroliks/Snake3d
I'am not experienced in using heroku so it might be simple solution, but I can't find any on the web.
Upvotes: 0
Views: 1079
Reputation: 119
From my experience, there are four potential problems.
First, you need to make sure that you have the Procfile that is capable of executing your script. It should contain something like this:
node server.js
Second, you need to make sure that your package.json
has all the necessary dependencies listed along with the npm
start key. To ensure make sure that all your dependencies are loaded, delete your node_modules folder, run "npm install --production"
, then try to run your app. If you are missing any dependencies you will get a missing module error.
Third, make sure that your app works in heroku's
environment. Run "foreman start web" in your command line in the directory with the Procfile
, and then check out your site at localhost:5000.
The fourth probably source of error (and the error that I ran into) is that all these files (Procfile and package.json
) need to be in the git root directory. Foreman can run even if these files are not in the root directory, so just double check.
Upvotes: 1
Reputation: 11342
You need to add either a Procfile
that describes how to run your application, or a package.json
file that describes the dependencies, so that Heroku can determine what kind of application this is and compile it accordingly.
Something like:
or
Upvotes: 2