Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Unable to install Karma via npm #4308

Closed
morioa opened this Issue · 4 comments

4 participants

@morioa

CentOS 6.5 64-bit (VirtualBox VM)
node v0.10.22
npm 1.3.14


I initially installed node via a package manager as instructed in the CentOS section here. To make sure that method of installing node wasn't the reason for the error, I went ahead and removed node from the package manager and installed node manually from source files. In both cases, I tried to see if a npm cache clear would help, but it didn't.

It appeared to get everything, but at the end of the postinstall I got the following:


npm ERR! EEXIST, mkdir '/usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected'
File exists: /usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected
Move it away, and try again.

npm ERR! System Linux 2.6.32-431.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "karma"
npm ERR! cwd /var/www/src/angular-phonecat/app
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! path /usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected
npm ERR! fstream_path /usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue34.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:171:23
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.test.js'
npm ERR! If you need help, 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! System Linux 2.6.32-431.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "karma"
npm ERR! cwd /var/www/src/angular-phonecat/app
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! path /usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.test.js
npm ERR! fstream_path /usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.test.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: shasum check failed for /root/tmp/npm-3980-RC53qlI4/1386894484385-0.01467748242430389/tmp.tgz
npm ERR! Expected: [03726561bc268f2e5444f54c665b7fd4a8c029e2](#03726561bc268f2e5444f54c665b7fd4a8c029e2)
npm ERR! Actual:   [0d0c140399f38fd61dfa17d2f9b5dbbd058e372f](#0d0c140399f38fd61dfa17d2f9b5dbbd058e372f)
npm ERR!     at /usr/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR!     at ReadStream.<anonymous> (/usr/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR!     at ReadStream.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:920:16
npm ERR!     at process._tickCallback (node.js:415:13)
npm ERR! If you need help, 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! System Linux 2.6.32-431.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "karma"
npm ERR! cwd /var/www/src/angular-phonecat/app
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /var/www/src/angular-phonecat/app/npm-debug.log
npm ERR! not ok code 0

I guess the process cleans-up after itself, because the file it was complaining about for the initial EEXIST error was not present afterwards.

@morioa morioa closed this
@morioa

Closed on accident.

@morioa morioa reopened this
@morioa

I tried it again today a few times, and (unless I'm looking at this wrong) it looks like it happens in a different place every time I run it.

Here are the results after running the following commands 3 times back-to-back:

$ npm cache clear
$ npm install -g karma


Attempt 1

npm ERR! Error: ENOENT, lstat '/usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/null_string.js'
npm ERR! If you need help, 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! System Linux 2.6.32-431.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "karma"
npm ERR! cwd /var/www/src/angular-phonecat/app
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! path /usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/null_string.js
npm ERR! fstream_path /usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/null_string.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/WebSocket.js'
npm ERR! If you need help, 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! System Linux 2.6.32-431.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "karma"
npm ERR! cwd /var/www/src/angular-phonecat/app
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! path /usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/WebSocket.js
npm ERR! fstream_path /usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/WebSocket.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: shasum check failed for /root/tmp/npm-5042-1FQ7LllT/1386917095378-0.29467983916401863/tmp.tgz
npm ERR! Expected: [03726561bc268f2e5444f54c665b7fd4a8c029e2](#03726561bc268f2e5444f54c665b7fd4a8c029e2)
npm ERR! Actual:   [99479cead946da77e33159c008d3d805c528218c](#99479cead946da77e33159c008d3d805c528218c)
npm ERR!     at /usr/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR!     at ReadStream.<anonymous> (/usr/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR!     at ReadStream.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:920:16
npm ERR!     at process._tickCallback (node.js:415:13)
npm ERR! If you need help, 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! System Linux 2.6.32-431.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "karma"
npm ERR! cwd /var/www/src/angular-phonecat/app
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /var/www/src/angular-phonecat/app/npm-debug.log
npm ERR! not ok code 0

Attempt 2

npm ERR! Error: ENOENT, chown '/usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/ca1-key.pem'
npm ERR! If you need help, 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! System Linux 2.6.32-431.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "karma"
npm ERR! cwd /var/www/src/angular-phonecat/app
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! path /usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/ca1-key.pem
npm ERR! fstream_path /usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/ca1-key.pem
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chown
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:133:7
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue50.js'
npm ERR! If you need help, 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! System Linux 2.6.32-431.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "karma"
npm ERR! cwd /var/www/src/angular-phonecat/app
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! path /usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue50.js
npm ERR! fstream_path /usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue50.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: shasum check failed for /root/tmp/npm-5071-H7-_ClrK/1386917181852-0.582415534183383/tmp.tgz
npm ERR! Expected: [03726561bc268f2e5444f54c665b7fd4a8c029e2](#03726561bc268f2e5444f54c665b7fd4a8c029e2)
npm ERR! Actual:   [71d84288c90e3531a616d320c6a12d12483d2df9](#71d84288c90e3531a616d320c6a12d12483d2df9)
npm ERR!     at /usr/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR!     at ReadStream.<anonymous> (/usr/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR!     at ReadStream.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:920:16
npm ERR!     at process._tickCallback (node.js:415:13)
npm ERR! If you need help, 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! System Linux 2.6.32-431.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "karma"
npm ERR! cwd /var/www/src/angular-phonecat/app
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /var/www/src/angular-phonecat/app/npm-debug.log
npm ERR! not ok code 0

Attempt 3

npm ERR! Error: ENOENT, lstat '/usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.test.js'
npm ERR! If you need help, 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! System Linux 2.6.32-431.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "karma"
npm ERR! cwd /var/www/src/angular-phonecat/app
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! path /usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.test.js
npm ERR! fstream_path /usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.test.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, open '/usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue13.js'
npm ERR! If you need help, 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! System Linux 2.6.32-431.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "karma"
npm ERR! cwd /var/www/src/angular-phonecat/app
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! path /usr/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/expected/issue13.js
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! Error: shasum check failed for /root/tmp/npm-5101-1aRuw2Xb/1386917305647-0.03923493018373847/tmp.tgz
npm ERR! Expected: [03726561bc268f2e5444f54c665b7fd4a8c029e2](#03726561bc268f2e5444f54c665b7fd4a8c029e2)
npm ERR! Actual:   [abed6ea33ae89b48508ea9f89a833a92c0d96b4a](#abed6ea33ae89b48508ea9f89a833a92c0d96b4a)
npm ERR!     at /usr/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR!     at ReadStream.<anonymous> (/usr/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR!     at ReadStream.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:920:16
npm ERR!     at process._tickCallback (node.js:415:13)
npm ERR! If you need help, 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! System Linux 2.6.32-431.el6.x86_64
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "karma"
npm ERR! cwd /var/www/src/angular-phonecat/app
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /var/www/src/angular-phonecat/app/npm-debug.log
npm ERR! not ok code 0

Thanks in advance for any assistance I can get.

@solidline

I ran across this as well on my mac. After running npm cache clear karma installed ok.

@nathan7
Collaborator

Yep, npm cache clear usually resolves this kind of thing.
Issues with the cache are known, and being worked on.

@nathan7 nathan7 closed this
@othiym23 othiym23 added support and removed support labels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.