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

独自空忆成欢 提交于 2019-12-05 04:12:44

You have bower listed in you devDependencies but not in your dependencies. devDependencies are only installed in the development environment.

-----> Installing dependencies with npm

So when Heroku runs npm install its running the production environment and is not installing the devDeps, including bower. Thats your issue!

I was running into the same issue.

Remove this line from your "scripts" dependency in your package.json file.

"postinstall": "./node_modules/bower/bin/bower install"

courtesy of https://github.com/isaacs/npm/issues/3609

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!