2013-05-03 103 views
3

我制作了一个Node.js应用程序,并且希望将其部署到Heroku上。我正在关注Heroku doc,一切正常。 foreman start正确启动我的应用程序。Heroku Web Dyno失败

我把它推到Heroku的,没有任何问题(除了一个警告,因为我不指定Node.js的版本,没什么不好),然后,当我想要做的heroku ps:scale web=1我有这样的错误:

Scaling web dynos... failed 
! No such type as web. 

这里的Procfile

web: node app.js 

任何想法的内容?

+0

你的Procfile的内容是什么? – Daniel 2013-05-03 23:17:42

+0

以其内容编辑的问题。 – Axiol 2013-05-03 23:20:20

回答

-3
heroku ps:scale web=1 --app=my-cool-app-name 

“my-cool-app-name”是在heroku网站的“我的应用程序”屏幕上应用程序的名称。

0

如果我理解正确,在尝试调整dynos之前并未推送您的应用程序。你必须先做。推送到heroku远程时执行部署。在此之后,Web /节点环境可用,您可以继续扩展dynos。

8

也许你忘了推Procfileheroku,如下图所示:

$ heroku ps:scale web=1 
Scaling web dynos... failed 
! Resource not found 
$ git status 
# On branch master 
# Untracked files: 
# (use "git add <file>..." to include in what will be committed) 
# 
# Procfile 
no changes added to commit (use "git add" and/or "git commit -a") 
$ git add Procfile 
$ git commit -m "Add Procfile for Heroku" 
$ git push heroku 
$ heroku ps:scale web=1 
Scaling web dynos... done, now running 1 

我希望它能帮助:)

+2

确保Procfile没有文件扩展(将Procfile.txt更改为Procfile) – BuildingJarl 2013-12-11 11:11:41

1

Procfile名称是区分大小写的。我有同样的问题(命名为procfile),通过从git中删除,重命名为Procfile并再次推送解决它。