试图将node.js部署到Heroku:遇到编译错误?

时间:2014-01-22 22:10:45

标签: git heroku

73689 info install mean@0.1.2
73690 info postinstall mean@0.1.2
73691 verbose unsafe-perm in lifecycle true
73692 info mean@0.1.2 Failed to exec postinstall script
73693 error mean@0.1.2 postinstall: `node node_modules/bower/bin/bower install`
73693 error Exit status 1
73694 error Failed at the mean@0.1.2 postinstall script.
73694 error This is most likely a problem with the mean package,
73694 error not with npm itself.
73694 error Tell the author that this fails on your system:
73694 error     node node_modules/bower/bin/bower install
73694 error You can get their info via:
73694 error     npm owner ls mean
73694 error There is likely additional logging output above.
73695 error System Linux 3.8.11-ec2
73696 error command "/tmp/build_7a494e6b-c84c-45df-a7ae-d42028830f5d/vendor/node/bin/node" "/tmp/build_7a494e6b-c84c-45df-a7ae-d42028830f5d/vendor/node/bin/npm" "install" "--userconfig" "/tmp/build_7a494e6b-c84c-45df-a7ae-d42028830f5d/.npmrc" "--production"
73697 error cwd /tmp/build_7a494e6b-c84c-45df-a7ae-d42028830f5d
73698 error node -v v0.10.24
73699 error npm -v 1.3.21
73700 error code ELIFECYCLE
73701 verbose exit [ 1, true ]

 !     Push rejected, failed to compile Node.js app

这就是我推送到heroku时得到的结果

2 个答案:

答案 0 :(得分:1)

以下帖子回答了这个问题。解决方案对我有用:)

MEAN stack, Win 7, git push heroku master results in sh: bower: not found error

答案 1 :(得分:0)

原来我的bower.json有一个bootwatch版本3.0.3 + 1无法破译。所以我把它改为3.0.3并且它有用了