【问题标题】:Push rejected, no Cedar-supported app detected推送被拒绝,未检测到支持 Cedar 的应用
【发布时间】:2013-08-23 21:49:44
【问题描述】:

我知道这个问题已经被问过好几次了。但我无法阻止自己在这里发布这个。我是诺比。我正在尝试使用以下命令将应用程序从 git 推送到 heroku

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

我收到以下错误。

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 git@heroku.com:fast-fortress-3889.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:fast-fortress-3889.git'

我正在尝试使用 node.js 框架

更新

我的应用文件夹名为 vxxxx/ 中有两个文件

1.README.md

2.venkat1.js

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);

我没有任何其他文件。实际上这两个文件在我的 git repo 中。我正在尝试将其推送到 heroku 并使用 node.js 在那里运行应用程序

更新 2:

是的。我确实有一个 package.JSON 文件

{
  "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",
}

还有一个 Procfile。

web: node venkat1.js

【问题讨论】:

标签: git heroku


【解决方案1】:

Heroku 将通过在您的项目中查找特定文件来检测受支持的应用程序。 Heroku 在这里描述了这些“触发器”:

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

【讨论】:

    【解决方案2】:

    我正在回答我自己的问题。

    其实问题是我没有包含 node_modules

    所以我用了

    $ npm install
    

    之后,它没有问题推入 heroku。谢谢大家帮助我。

    【讨论】:

      【解决方案3】:

      我在将我的 rails 项目推送到 heroku 时遇到了同样的问题。

      直到我尝试使用下面的命令在heroku中创建,然后成功!!!你也应该试试这个。

      "heroku create --stack cedar"

      【讨论】:

        猜你喜欢
        • 2014-01-22
        • 2012-01-11
        • 2013-11-28
        • 2014-11-09
        • 2015-07-18
        • 2012-12-05
        • 1970-01-01
        • 2012-03-07
        • 1970-01-01
        相关资源
        最近更新 更多