Lev
Lev

Reputation: 15684

Heroku won't install my dev dependencies with NPM_CONFIG_PRODUCTION=false

It refuses to do it although it set

NPM_CONFIG_PRODUCTION=false

Config variables section of the dashboard

Do I have to do an extra action in the dashboard?

Upvotes: 0

Views: 1284

Answers (1)

Andrés Andrade
Andrés Andrade

Reputation: 2223

The NODE_ENV environment variable is set to 'production’ by default. Since you usually don’t want all development dependencies in your production builds, it’s preferable to move only the dependencies you actually need for production builds or change it value to 'development' or any arbitrary string:

heroku config:set NODE_ENV=development

Upvotes: 1

Related Questions