部署到heroku的错误 [英] errors deploying to heroku

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

问题描述



  remote:npm ERR!告诉作者,你的系统失败了:
remote:npm ERR! bower安装

文档 https://devcenter.heroku.com/articles/nodejs-support 向我展示了如何添加凉亭



这是我的package.json。我不知道我可能会错过什么。我有我的引擎和npm确定。

  {
name:caffeine,
version:0.0.0 ,
private:true,
scripts:{
postinstall:bower install,
start:node app.js

dependencies:{
body-parser:〜1.12.0,
cookie-parser:〜1.3.4,
debug:〜2.1.1,
express:〜4.12.2,
express-session:^ 1.11.3,
jade :〜1.9.2,
moment:^ 2.10.3,
mongoose:^ 4.0.2,
morgan:〜1.5。 1,
node-phantom-simple:^ 1.2.0,
passport:^ 0.2.2,
passport-facebook:^ 2.0 .0,
passport-google-oauth:^ 0.2.0,
护照本地:^ 1.0.0,
passport-local-mongoose :^ 1.0.0,
serve-favicon:^ 2.2.0,
should:^ 6.0.3,
swig: ^ 1.4.2

devDependencies:{
gulp:^ 3.9.0,
gulp-jshint:^ 1.11.0 ,
gulp-nodemon:^ 2.0.3
},
engines:{
node:0.10.29,
npm:2.1.11
}
}
解决方案

首先尝试确定问题是在Heroku还是在本地使用你的包/放置器安装。试试这个:

删除您的 bower_components 目录,然后运行 bower install 。当我做这个角度需要帮助解决它的版本。我选择了其中一个替代方案,并在其前加一个,将它添加到我的 bower.json中:



< pre $ resolution:{
angular:〜1.3.8
}

然后进行depolyed和postinstall工作。最重要的是,在告诉Heroku运行它之前, bower install 应重新创建已删除的 bower_components ,而不在本地任何模糊。


I am getting a series of error when I try to push to heroku master.

    remote:  npm ERR! Tell the author that this fails on your system:
    remote:        npm ERR!     bower install

The docs https://devcenter.heroku.com/articles/nodejs-support showed me how to add bower

Here is my package.json. I am not sure what I could be missing. I have my engine and npm identified.

{
  "name": "caffeine",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "postinstall": "bower install",
    "start": "node app.js"
  },
  "dependencies": {
    "body-parser": "~1.12.0",
    "cookie-parser": "~1.3.4",
    "debug": "~2.1.1",
    "express": "~4.12.2",
    "express-session": "^1.11.3",
    "jade": "~1.9.2",
    "moment": "^2.10.3",
    "mongoose": "^4.0.2",
    "morgan": "~1.5.1",
    "node-phantom-simple": "^1.2.0",
    "passport": "^0.2.2",
    "passport-facebook": "^2.0.0",
    "passport-google-oauth": "^0.2.0",
    "passport-local": "^1.0.0",
    "passport-local-mongoose": "^1.0.0",
    "serve-favicon": "^2.2.0",
    "should": "^6.0.3",
    "swig": "^1.4.2"
  },
  "devDependencies": {
    "gulp": "^3.9.0",
    "gulp-jshint": "^1.11.0",
    "gulp-nodemon": "^2.0.3"
  },
  "engines": {
    "node": "0.10.29",
    "npm": "2.1.11"
  }
}

解决方案

First try to determine if the problem is at Heroku or locally with your packages/bower setup. Try this:

Remove your bower_components directory and then run bower install. When I did this angular needed help with resolving its version. I chose one of the alternatives, prefixed it with a "!" which added this to my bower.json:

  "resolutions": {
    "angular": "~1.3.8"
  }

Then depolyed and the postinstall worked. The bottom line is that bower install should recreate the deleted bower_components without any fuzz locally, before you tell Heroku to run it.

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

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