npm install --dev fails #2447

Closed
Sannis opened this Issue May 14, 2012 · 2 comments

Comments

Projects
None yet
2 participants
Contributor

Sannis commented May 14, 2012

Here is some npm install that I can't explain using current documentation.

Initial state: module without node_modules subdir and some dependencies in package.json:

, "dependencies" :
  { "request" : "2.9.202"
  }
, "devDependencies" :
  { "nodeunit" : "0.7.4"
  , "nodelint" : "0.6.1"
  , "async" : "0.1.18"
  }

npm install produces:

async@0.1.18 ./node_modules/async

request@2.9.202 ./node_modules/request

nodelint@0.6.1 ./node_modules/nodelint
└── file@0.2.1

nodeunit@0.7.4 ./node_modules/nodeunit
└── tap@0.2.5 (buffer-equal@0.0.0, deep-equal@0.0.0, mkdirp@0.3.2, slide@1.1.3, nopt@1.0.10, difflet@0.2.1, runforcover@0.0.2)

npm install --dev produces:

npm http GET https://registry.npmjs.org/request/2.9.202
npm http GET https://registry.npmjs.org/nodeunit/0.7.4
npm http GET https://registry.npmjs.org/nodelint/0.6.1
npm http GET https://registry.npmjs.org/async/0.1.18
npm http 304 https://registry.npmjs.org/request/2.9.202
npm http 304 https://registry.npmjs.org/async/0.1.18
npm http 304 https://registry.npmjs.org/nodeunit/0.7.4
npm http 304 https://registry.npmjs.org/nodelint/0.6.1
npm http GET https://registry.npmjs.org/uglify-js
npm http GET https://registry.npmjs.org/file
npm http GET https://registry.npmjs.org/ronn
npm http GET https://registry.npmjs.org/tap
npm http GET https://registry.npmjs.org/uglify-js
npm http GET https://registry.npmjs.org/should
npm http 304 https://registry.npmjs.org/uglify-js
npm http 304 https://registry.npmjs.org/file
npm http 304 https://registry.npmjs.org/ronn
npm http 304 https://registry.npmjs.org/should
npm http 304 https://registry.npmjs.org/tap
npm http 304 https://registry.npmjs.org/uglify-js
npm http GET https://registry.npmjs.org/opts
npm http GET https://registry.npmjs.org/mocha
npm http GET https://registry.npmjs.org/slide
npm http GET https://registry.npmjs.org/runforcover
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/difflet
npm http GET https://registry.npmjs.org/deep-equal
npm http GET https://registry.npmjs.org/buffer-equal
npm http 304 https://registry.npmjs.org/opts
npm http 304 https://registry.npmjs.org/mocha
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/slide
npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/runforcover
npm http 304 https://registry.npmjs.org/difflet
npm http 304 https://registry.npmjs.org/deep-equal
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/growl
npm http GET https://registry.npmjs.org/jade/0.20.3
npm http GET https://registry.npmjs.org/diff/1.0.2
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/buffer-equal
npm http GET https://registry.npmjs.org/tap
npm http GET https://registry.npmjs.org/bunker
npm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/traverse
npm http GET https://registry.npmjs.org/charm
npm http GET https://registry.npmjs.org/ent
npm http GET https://registry.npmjs.org/tap
npm http 304 https://registry.npmjs.org/debug
npm http 304 https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/tap
npm http GET https://registry.npmjs.org/tap-runner
npm http 304 https://registry.npmjs.org/bunker
npm http GET https://registry.npmjs.org/burrito
npm http 304 https://registry.npmjs.org/abbrev
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/diff/1.0.2
npm http 304 https://registry.npmjs.org/growl
npm http 304 https://registry.npmjs.org/jade/0.20.3
npm http 304 https://registry.npmjs.org/traverse
npm http 304 https://registry.npmjs.org/charm
npm http 304 https://registry.npmjs.org/ent
npm http 304 https://registry.npmjs.org/tap
npm http 304 https://registry.npmjs.org/tap-runner
npm http 304 https://registry.npmjs.org/burrito
npm WARN deprecated tap-runner@0.0.7: this is merged into the 'tap' module now
npm http GET https://registry.npmjs.org/tap-results
npm http GET https://registry.npmjs.org/yamlish
npm http GET https://registry.npmjs.org/tap-producer
npm http GET https://registry.npmjs.org/tap-consumer
npm http GET https://registry.npmjs.org/tap-assert
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/expresso
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/markdown
npm http GET https://registry.npmjs.org/uubench/0.0.1
npm http GET https://registry.npmjs.org/stylus
npm http GET https://registry.npmjs.org/jison
npm http GET https://registry.npmjs.org/traverse
npm http GET https://registry.npmjs.org/uglify-js/1.0.7
npm http GET https://registry.npmjs.org/expresso
npm http 304 https://registry.npmjs.org/tap-results
npm http 304 https://registry.npmjs.org/tap-producer
npm http 304 https://registry.npmjs.org/tap-consumer
npm http 304 https://registry.npmjs.org/yamlish
npm http 304 https://registry.npmjs.org/tap-assert
npm WARN deprecated tap-results@0.0.2: this is merged into the 'tap' module now
npm WARN deprecated tap-consumer@0.0.1: this is merged into the 'tap' module now
npm WARN deprecated tap-producer@0.0.1: this is merged into the 'tap' module now
npm WARN deprecated tap-assert@0.0.10: this is merged into the 'tap' module now
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/expresso
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/uubench/0.0.1
npm http 304 https://registry.npmjs.org/markdown
npm http 304 https://registry.npmjs.org/stylus
npm http 304 https://registry.npmjs.org/jison
npm http 304 https://registry.npmjs.org/traverse
npm http 304 https://registry.npmjs.org/uglify-js/1.0.7
npm http 304 https://registry.npmjs.org/expresso

npm ERR! EEXIST, mkdir '/Users/sannis/Documents/Projects/Other/wikimapia-api-clients/nodejs/node_modules/nodeunit/node_modules/tap/node_modules/difflet/node_modules/traverse/node_modules/expresso/deps/jscoverage'
npm ERR! File exists: /Users/sannis/Documents/Projects/Other/wikimapia-api-clients/nodejs/node_modules/nodeunit/node_modules/tap/node_modules/difflet/node_modules/traverse/node_modules/expresso/deps/jscoverage
npm ERR! Move it away, and try again.
npm ERR! 
npm ERR! System Darwin 11.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "--dev"
npm ERR! cwd /Users/sannis/Documents/Projects/Other/wikimapia-api-clients/nodejs
npm ERR! node -v v0.6.17
npm ERR! npm -v 1.1.21
npm ERR! path /Users/sannis/Documents/Projects/Other/wikimapia-api-clients/nodejs/node_modules/nodeunit/node_modules/tap/node_modules/difflet/node_modules/traverse/node_modules/expresso/deps/jscoverage
npm ERR! fstream_path /Users/sannis/Documents/Projects/Other/wikimapia-api-clients/nodejs/node_modules/nodeunit/node_modules/tap/node_modules/difflet/node_modules/traverse/node_modules/expresso/deps/jscoverage/aclocal.m4
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code EEXIST
npm ERR! message EEXIST, mkdir '/Users/sannis/Documents/Projects/Other/wikimapia-api-clients/nodejs/node_modules/nodeunit/node_modules/tap/node_modules/difflet/node_modules/traverse/node_modules/expresso/deps/jscoverage'
npm ERR! errno {}
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:171:23
npm ERR! fstream_stack Object.oncomplete (/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:36:53)

npm ERR! Error: ENOENT, utime '/Users/sannis/Documents/Projects/Other/wikimapia-api-clients/nodejs/node_modules/nodeunit/node_modules/should/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/mkdirp.js'
npm ERR! You may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! 
npm ERR! System Darwin 11.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "--dev"
npm ERR! cwd /Users/sannis/Documents/Projects/Other/wikimapia-api-clients/nodejs
npm ERR! node -v v0.6.17
npm ERR! npm -v 1.1.21
npm ERR! path /Users/sannis/Documents/Projects/Other/wikimapia-api-clients/nodejs/node_modules/nodeunit/node_modules/should/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/mkdirp.js
npm ERR! fstream_path /Users/sannis/Documents/Projects/Other/wikimapia-api-clients/nodejs/node_modules/nodeunit/node_modules/should/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/mkdirp.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chown
npm ERR! code ENOENT
npm ERR! message ENOENT, utime '/Users/sannis/Documents/Projects/Other/wikimapia-api-clients/nodejs/node_modules/nodeunit/node_modules/should/node_modules/mocha/node_modules/jade/node_modules/mkdirp/test/mkdirp.js'
npm ERR! errno {}
npm ERR! fstream_stack Object.oncomplete (/usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19)
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/sannis/Documents/Projects/Other/wikimapia-api-clients/nodejs/npm-debug.log
npm not ok

Full logs.

Why npm install install devDependencies and why npm install --dev fails?

Owner

isaacs commented May 27, 2012

Why npm install install devDependencies

Running npm install with no arguments installs devDependencies for the first level only. This is because that is usually done in development, so people want to be able to run tests, compile coffeescripts, and so on.

Use npm install --production to not install any devDependencies.

why npm install --dev fails?

At some point in the dependency chain, burrito is trying to pull in expresso@=0.7.x. The = sign causes a problem along with the .x.

This is a bug in semver, imo, but I sent a pull req to @substack as well substack/node-burrito#8

@isaacs isaacs closed this May 27, 2012

isaacs added a commit to npm/node-semver that referenced this issue May 27, 2012

Contributor

Sannis commented May 27, 2012

Thanks! I assumed this, but doc doesn't include this information and looks a bit outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment