Install devDependencies on Heroku

前端 未结 5 1687
南笙
南笙 2020-12-23 12:30

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 depen

5条回答
  •  -上瘾入骨i
    2020-12-23 13:26

    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.

提交回复
热议问题