在Heroku上安装devDependencies [英] Install devDependencies on Heroku
问题描述
我想让Heroku在推送后构建我的应用程序,以便在每次进行更改时不必将构建文件夹向上推。然而,heroku只安装package.json和grunt(我的构建工具)的依赖关系,其所有组件都在devDependencies中。我想让他们留在他们所属的地方。这里有什么解决方法?
Heroku默认只安装生产依赖项,忽略下的开发依赖项。 devDependencies
。
设置npm生产变量为 false
p>
heroku config:set NPM_CONFIG_PRODUCTION = false
更多信息请参阅 Heroku Node.js支持页面。
I would like to have Heroku build my app after I push it so that I don't have to push the build folder up every time I make a change. However heroku only installs the dependencies from the package.json and grunt (my build tool) and all of its components are in devDependencies. I would like to keep them there where they belong. What's the workaround here?
Heroku by default installs only the production dependencies, ignoring the development dependencies under devDependencies
.
Setting the npm production variable to false
do the trick:
heroku config:set NPM_CONFIG_PRODUCTION=false
More info are available at the Heroku Node.js Support page.
这篇关于在Heroku上安装devDependencies的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!