is there a way to display NODE_ENV from the command line?
echo $NODE_ENV
before running your app, you can do this in console:
export NODE_ENV=production
** or if you are in windows you could try this:**
SET NODE_ENV=production
** or you can run your app like this:**
NODE_ENV=production node app.js
how do you prevent install of “devDependencies” NPM modules for Node.js (package.json)?
npm install #will install both "dependencies" and "devDependencies"
npm install --only=prod #will only install "dependencies"
npm install --only=dev #will only install "devDependencies"
check your npm configuration:
npm config list
clear npm cache
npm cache clean