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
就足够了
- ExpressJS在向数据库添加logging后重新查询数据库
- “使用Node.js进行直接响应” – 使用不同的Node.js进程发送HTTP响应(与主进程不同)
- 如何使用Google数据存储创build模式(在JavaScript中)?
- 如何从Mongodb + Express.js的集合中检索所有的用户标识?
- 使用passport.js和express.js(node.js)创build安全的oauth API
- 使用jQuery AJAX与node.js,处理来自服务器的响应
- 快速应用程序 – 在Heroku上运行,并使用Parse作为后端
- 节点JS:login不起作用
- nodemon – 应用程序崩溃 – 在启动之前等待文件更改