'找不到那个编队'Heroku部署错误 [英] 'Couldn't find that formation' heroku deployment error

查看:134
本文介绍了'找不到那个编队'Heroku部署错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Heroku上部署MEAN堆栈(MongoDB-Express-Angularjs-Nodejs)应用程序.用git push heroku推送代码后,出现以下错误缩放dynos ...失败!找不到该格式".

I am trying to deploy a MEAN stack (MongoDB-Express-Angularjs-Nodejs) app on Heroku. After I push my code with git push heroku I get the following error "Scaling dynos... failed! Couldn't find that formation".

我检查了没有运气的解决方案.我创建了一个Procfile,但这没有帮助.我仍然遇到相同的错误.

I have checked for a solution with no luck. I created a Procfile, but that didn't help. I still get the same error.

关于如何启动和运行它的任何想法.我将包含更多代码,但我不知道问题出在哪里,所以请提出,我将包含必要的代码.

Any ideas on how I could get this up and running. I would include more code but I don't know where the problem is so please ask and I will include that code that is necessary.

推荐答案

好的,所以我发现了我的问题所在.当我看到错误日志时,很明显我遇到了MongoDB连接错误.我必须指出正确的MongoDB实例,它的工作原理很吸引人.下面发布的是我修改"server.js"文件后用来纠正该问题的特定命令.

Okay so I found what was my problem. When I saw the error logs it was painfully obvious that I was having a MongoDB connection error. I had to point to the correct MongoDB instance and that worked like a charm. Posted below are the specific commands I used to correct the issue after I modified the "server.js" file.

最终使我能够在Heroku上部署的东西!

What finally worked to allow me to deploy on Heroku!

> (reverse order)
>     $ heroku open
>     $ git push heroku master
>     $ git commit -m "myMessage"
>     $ git add <file>
>     $ git status

提交消息:我更新了mongoDB连接,然后提交,并将更改推送到Heroku,现在该应用程序已在线加载.

Commit message: I updated the mongoDB connection then committed and pushed the changes to Heroku now the app loads online.

这篇关于'找不到那个编队'Heroku部署错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆