On Thursday, July 23, 2015 at 3:13:49 PM UTC-4, Victor Roman wrote:
>
> When I run "npm install grunt", grunt installs into the local dir fine and 
> within seconds.
>
> If I have a package.json with grunt as a devDependency and run "npm 
> install --dev" I see many warnings at first about other packages, which I 
> assume grunt depends on.  Specifically, errors about packages being in both 
> the dependencies and devDependencies list.  Eventually, I just start seeing 
> tons of errors that say "attempt to lock file which hasn't been locked".
>
> Why does "npm install grunt" work fine but "npm install --dev" have all 
> these problems?  Is there a difference between the two?
>
>
--dev doesn't do what you think it does.

It flips an internal flag that does about 6 different things depending on 
context.

plain npm install will install all devDependencies of the root module, the 
one you run npm install in.

Its inversion of that behavior is npm install --production; in normal use, 
you'll never use --dev.

Out of curiosity, where'd you pick up the idea to run --dev?

Aria
 

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/d852b721-788d-4dd1-9d26-832ffc861b8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to