How can I invoke npm on heroku command line (to install bower components)?

你离开我真会死。 提交于 2019-11-28 17:29:15

You can also setup a postintall command, something like this in your package.json

"dependencies": {
    "bower": "0.6.x"
},
"scripts": {
    "postinstall": "./node_modules/bower/bin/bower install"
}

Then npm install will also install bower dependencies.

Pros : one command to rule them all.

Cons : you unnecessarily embed bower as a dependency.

You can use run like this:

heroku run npm install git://github.com/webjay/kaiseki
dani herrera

You should declare NPM dependencies in the package.json file

All you install from shell will be deleted on exit shell. You are in a cloned instance.

You can use bower directly like this

"dependencies": {
    "bower": "^1.7.9"
},
"scripts": {
    "postinstall": "sudo bower install --allow-root "
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!