heroku的节点:! Heroku推送被拒绝,没有检测到雪松支持的应用程序

我是新来的heroku和express.js。 我尝试通过教程,但我不能与步骤'git push heroku master'。 我完全按照教程。 以下是错误消息:

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

你是否阅读过Heroku开发中心的Heroku文章入门Node.js ?

您需要使用Procfile声明您的stream程types 。 为此,请创build一个名为Procfile的文件,其中包含以下内容:

 web: node web.js 

假设你的JavaScript文件被称为web.js

ps不要忘记添加Procfile git并提交它。

你需要一个package.json文件(和一个Procfile),情况可能不是这样。

几次之前我遇到过这个问题,那是因为我试图把一个远程分支推到heroku。

要解决这个问题,不要使用:

 git push heroku master 

我用了:

 git push heroku my-branch:master 

这将git仓库中的远程分支my-branch推送到heroku的master分支。

只是为了logging,我也遇到了同样的问题,原来是Heroku中的configurationvariables之一。 我删除configurationvariables和应用程序被推成功。

对我来说,做npm init就足够了