node.js - Where is 'NODE_ENV' being set to 'production'? -


i tried run npm install install packages newly added dev dependencies package.json. surprise couldn't npm install of new dev dependencies. after digging around realised node_env environmental variable set production. appears set default when open new shell (i can see using printenv), , isn't being done in ~/.bash_profile. inside ~/.npmrc contains commented lines, where might being set?

edit:

i'm on osx, , there nothing wrong package.json. can install dev dependencies using node_env=development npm install.

it's not being set in:

~/.bashrc ~/.bash_profile ~/.npmrc /etc/profile.d/* 

you have couple of places check:

~/.bashrc ~/.bash_profile ~/.npmrc ~/.zshrc (if you've got zsh installed) /etc/profile.d/env (or similar file) 

you run export node_env=development before running npm install, or see here more information npm install:

https://docs.npmjs.com/misc/config#production

might want paste package.json file here , have sanity check devdependencies declaration.

edit: should able force npm install --dev


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -