Giter Site home page Giter Site logo

Comments (5)

noseglid avatar noseglid commented on July 28, 2024 2

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.

dannyfritz avatar dannyfritz commented on July 28, 2024

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.

noseglid avatar noseglid commented on July 28, 2024

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.

dannyfritz avatar dannyfritz commented on July 28, 2024

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.

ldrick avatar ldrick commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.