Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Push rejected, no Cedar-supported app detected

Tags:

git

heroku

I know this question has been asked several times. But I couldnot stop myself to post this here. I am nooby. I am trying to push the app from git to heroku using the following command

ubuntu@ip-1x2-xx-xx-xxx:~/vexxx$ git push heroku master

I am getting the following error.

Counting objects: 8, done.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (8/8), 1015 bytes, done.
Total 8 (delta 0), reused 0 (delta 0)


 !     Push rejected, no Cedar-supported app detected

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

I am trying to use node.js framework

UPDATE

I have two files in my app folder name vxxxx/

1.README.md

2.venkat1.js

Inside venkat1.js

    #!/usr/bin/env node
var fs = require('fs');
var outfile = "hello.txt";
var out = "A startup is a business built to grow rapidly.\n";
fs.writeFileSync(outfile, out);  
console.log("Script: " + __filename + "\nWrote: " + out + "To: " + outfile);

I do not have any other files. Actually these two files are in my git repo. I am trying to push it to heroku and run the app there using node.js

Update 2:

Yes. I do have a package.JSON file

{
  "name": "vxxxxx",
  "version": "0.0.2",
  "description": "a sample node.js app for heroku",
  "main": "venkat1.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "dependencies": {
    "express": "~3.3.4"
  },
  "engines": {
    "node": "0.10.13",
    "npm": "1.3.2"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/Mygitusername/myreponame"
  },
  "keywords": [
    "node",
    "heroku"
  ],
  "author": "Venkateshwaran",
  "license": "MIT",
}

and a Procfile too.

web: node venkat1.js
like image 914
Venkateshwaran Selvaraj Avatar asked Aug 21 '13 13:08

Venkateshwaran Selvaraj


2 Answers

Heroku will detect a supported app by looking for specific files in your project. Heroku describes these "triggers" here:

https://devcenter.heroku.com/articles/quickstart

like image 181
Mike Avatar answered Sep 28 '22 15:09

Mike


I am answering my own question .

Actually the problem was that I did not include node_modules

so I used

$ npm install

After that it had no problem pushing into heroku. Thanks everyone for helping me.

like image 34
Venkateshwaran Selvaraj Avatar answered Sep 28 '22 15:09

Venkateshwaran Selvaraj