Comments (5)
Hmm, I wonder if this package should unset NODE_ENV
so it's independent of what Atom has. What do you think?
I really hate that it's inheriting that environment.
from atom-build-npm-apm.
Poked a little further in the npm help install
help file. Very likely related to this:
By default, npm install will install all modules listed as depen-
dencies
in npm help 5 package.json.
With the --production flag (or when the NODE_ENV environment vari-
able
is set to production), npm will not install modules listed in
devDependencies.
production
is probably what Atom is running under.
from atom-build-npm-apm.
Hmm, I think the reason is because atom runs with NODE_ENV=production
(which sets the same options as --production
flag). All tough this is quite speculatory from my side.
Does it work if you start atom from the command line with NODE_ENV=development atom
or something equivalent if you're on windows? I'm not sure how to set environment for windows applications...
from atom-build-npm-apm.
This was happening on my OSX machine, which I won't be on again until Monday. I suspect running Atom with -d
or --dev
will make it install the devDependencies
as Atom does indeed run under production
mode most of the time. Can be confirmed by opening the JS Console in Atom and typing process.env.NODE_ENV
from atom-build-npm-apm.
I had to change this line:
const env = {FORCE_COLOR: '1', MOCHA_COLORS: '1', NPM_CONFIG_COLOR: 'always'};
to this:
const env = {FORCE_COLOR: '1', MOCHA_COLORS: '1', NPM_CONFIG_COLOR: 'always', NODE_ENV: ''};
Otherwise all my dev-dependencies were purged.
But configuration would be the best solution for my team.
from atom-build-npm-apm.
Related Issues (9)
- Problems running npm scripts on Windows platform
- Not found `npm` with nvm! HOT 6
- cannot find module npm/bin/npm/npm-cli.js HOT 5
- editor windows hangs on show targets HOT 1
- Consider a user setting or a different default other than install HOT 6
- Configure path to package.json HOT 3
- Spawned child process inherits process.env.NODE_PATH from Atom HOT 2
- Specify in README that โenginesโ field is needed HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atom-build-npm-apm.