当我尝试推送到heroku master时,我遇到了一系列错误。
remote: npm ERR! Tell the author that this fails on your system:
remote: npm ERR! bower install
文档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",
"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"
}
}
答案 0 :(得分:0)
首先尝试确定问题是在Heroku还是本地与您的包/凉亭设置。试试这个:
删除 bower_components 目录,然后运行bower install
。当我这样做时,角度需要帮助解决它的版本。我选择了其中一种替代方案,并以" !"它将此添加到我的 bower.json:
"resolutions": {
"angular": "~1.3.8"
}
然后depolyed和postinstall工作。最重要的是 bower install 应该在您告诉Heroku运行它之前,在本地没有任何模糊的情况下重新创建已删除的 bower_components 。