我做了一个小的Node.js应用程序,想把它部署在Heroku上。我正在遵循Heroku doc,一切工作正常。foreman start正确启动我的应用程序。
我将它推送到Heroku,没有问题(除了一个警告,因为我没有指定Node.js版本,没有什么不好的),然后,当我想要做heroku ps:scale web=1时,我得到了这个错误:
Scaling web dynos... failed
! No such type as web.下面是Procfile的内容
web: node app.js有什么想法吗?
发布于 2013-11-21 02:31:44
可能您忘记了将Procfile推送到heroku,如下所示:
$ 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我希望它能有所帮助:)
发布于 2013-12-09 15:35:56
Procfile名称区分大小写。我有同样的问题(命名为procfile),通过从git中删除,重命名为Procfile并再次推送来解决它。
发布于 2013-11-12 19:59:16
如果我理解正确的话,您在尝试扩展dynos之前并没有推送您的应用程序。你必须先做这件事。部署在推送到heroku遥控器时执行。在此之后,web/node环境可用,您可以继续扩展dynos。
https://stackoverflow.com/questions/16368861
复制相似问题