【发布时间】:2014-03-01 13:16:48
【问题描述】:
我正在尝试在 Heroku 上部署一个 NodeJs 应用程序,这个应用程序使用 bower。 我做了here 的建议,但是在推送之后我在 Heroku 上遇到了这个错误:
git的bower错误状态码:128
【问题讨论】:
我正在尝试在 Heroku 上部署一个 NodeJs 应用程序,这个应用程序使用 bower。 我做了here 的建议,但是在推送之后我在 Heroku 上遇到了这个错误:
git的bower错误状态码:128
【问题讨论】:
显然人们已经清理了他们的缓存?
https://github.com/bower/bower/issues/50
您可以使用以下命令在 Heroku 主机上运行任意命令:
heroku run console
【讨论】:
好吧,这样做可能无法解决此问题,但您可以使用
git config --global url."https://".insteadOf git://
告诉 git 使用 HTTPS 而不是 GIT,这对我来说可以安装 npm 依赖项。
【讨论】:
这是我在应用中使用的:
package.json 添加适当的脚本
"scripts": {
"start": "node web.js",
"postinstall": "bower cache clean && bower install"
},
bower添加到依赖列表"dependencies": {
...
"bower": "~1.3.12",
...
},
Heroku 的发布流程如下install
postinstall
start
【讨论】: