Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

247
Views
Heroku skips pruning devDependencies when NPM_CONFIG_PRODUCTION is 'false'

I'm trying to deploy a JS/node/express/webpack application to Heroku.

I need Heroku to install my devDependencies because it includes webpack, which is necessary to build the client-side files of my project.

However, I cannot get Heroku to read my devDependencies.

I have read everywhere that setting NPM_CONFIG_PRODUCTION = 'false' will fix this, but it does not. Here are my config vars for my Heroku build (taken from the build log):

NPM_CONFIG_PRODUCTION=false    // I set this from both the heroku-cli and the web ui
NPM_CONFIG_LOGLEVEL=error
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true

Then the logs go on to say:

-----> Pruning devDependencies
       Skipping because NPM_CONFIG_PRODUCTION is 'false'

Isn't the desired behavior that devDependencies will be install when this var is set to false?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!