我知道这个问题已经被问过好几次了。但我无法阻止自己在这里发布这个。我是诺比。我正在尝试使用以下命令将应用程序从 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