本文介绍了将应用程序部署到Heroku时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用git hub将我的应用部署到heroku时,出现某种错误。问题是,我不明白heroku日志和错误。这里是heroku日志:
I am getting some kind of error when deploying my app to heroku using git hub. The problem is, I don't understand the heroku logs and the entailing errors. Here is the heroku log:
Marcuss-MacBook-Pro:Weather-App marcushurney$ heroku logs 2016-01-05T14:37:27.798077+00:00 app[web.1]: npm ERR! Please include the following file with any support request: 2016-01-05T14:37:27.798377+00:00 app[web.1]: npm ERR! /app/npm-debug.log 2016-01-05T14:37:27.786949+00:00 app[web.1]: npm ERR! node v5.1.1 2016-01-05T14:37:27.786556+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start" 2016-01-05T14:37:27.787856+00:00 app[web.1]: npm ERR! npm v3.3.12 2016-01-05T14:37:28.776245+00:00 heroku[web.1]: Process exited with status 1 2016-01-05T14:37:28.789412+00:00 heroku[web.1]: State changed from starting to crashed 2016-01-05T17:27:16.684869+00:00 heroku[web.1]: State changed from crashed to starting 2016-01-05T17:27:17.853743+00:00 heroku[web.1]: Starting process with command `npm start` 2016-01-05T17:27:20.423495+00:00 app[web.1]: npm ERR! node v5.1.1 2016-01-05T17:27:20.423130+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start" 2016-01-05T17:27:20.424111+00:00 app[web.1]: npm ERR! npm v3.3.12 2016-01-05T17:27:20.425937+00:00 app[web.1]: npm ERR! missing script: start 2016-01-05T17:27:20.422441+00:00 app[web.1]: npm ERR! Linux 3.13.0-71-generic 2016-01-05T17:27:20.426242+00:00 app[web.1]: npm ERR! 2016-01-05T17:27:20.426432+00:00 app[web.1]: npm ERR! If you need help, you may report this error at: 2016-01-05T17:27:20.426634+00:00 app[web.1]: npm ERR! <github/npm/npm/issues>推荐答案
您必须通知heroku从哪里开始:缺少脚本:start 。在你的package.json中,你应该有一些像这个:
You have to inform heroku where to start : missing script: start. In your package.json, you should have something like this:
"scripts": { "start": "node index.js" }其中 index.js 是您的入口点。
作为 Procfile 中指定:
web: node index.js更多推荐
将应用程序部署到Heroku时出错
发布评论