question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`npm install` is executed regardless of node_env

See original GitHub issue

I would prefer something like this in the post process hook:

NODE_ENV={{node_env}} npm install 

If you agree, I will create a (tested) PR

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
paulpflugcommented, Feb 4, 2016

With the --production flag (or when the NODE_ENV environment variable is set to production), npm will not install modules listed in devDependencies. (https://docs.npmjs.com/cli/install)

and that is cool 😉

0reactions
paulpflugcommented, Aug 5, 2016

I’m working on other things right now, but it is still on my agenda…

Read more comments on GitHub >

github_iconTop Results From Across the Web

env variable NODE_ENV=production effect on npm install is ...
To install dev dependencies, npm --production=false install will work even with NODE_ENV=production . Or you can run NODE_ENV=development npm ...
Read more >
npm install won't install devDependencies - Stack Overflow
For my build to run properly I was not allowed to change the value of NODE_ENV so I forced npm to install all...
Read more >
node-env-run - npm
node-env -run. Command-line tool to read .env files and execute scripts/commands after loading those environment variables. Uses dotenv ...
Read more >
NODE_ENV is always "development" regardless of my secrets ...
The command I'm using to start the server in my Dockerfile is CMD ["npm", "run", "start"] and in my package.json's script section I...
Read more >
Node.js Everywhere with Environment Variables! - Medium
Create an empty folder named env-playground . Then create a file named server.js and add the code above to it. Now when you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found