4

Trying to install Karma with node v0.10.13 and npm 1.3.2. Tried with and without sudo. Here's the log:

npm http GET https://registry.npmjs.org/karma
npm http GET https://registry.npmjs.org/karma
npm http GET https://registry.npmjs.org/karma
npm http GET https://registry.npmjs.org/di
npm http GET https://registry.npmjs.org/chokidar
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/socket.io
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/http-proxy
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/q
npm http GET https://registry.npmjs.org/colors/0.6.0-1
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/log4js
npm http GET https://registry.npmjs.org/useragent
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/connect
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/socket.io
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/lodash
npm http 304 https://registry.npmjs.org/useragent
npm http 304 https://registry.npmjs.org/log4js
npm http 304 https://registry.npmjs.org/q
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/connect
npm http GET https://registry.npmjs.org/di
npm http GET https://registry.npmjs.org/chokidar
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/http-proxy
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/colors/0.6.0-1
npm http 304 https://registry.npmjs.org/http-proxy
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/colors/0.6.0-1
npm http GET https://registry.npmjs.org/colors/-/colors-0.6.0-1.tgz
npm ERR! fetch failed https://registry.npmjs.org/colors/-/colors-0.6.0-1.tgz
npm http GET https://registry.npmjs.org/colors/-/colors-0.6.0-1.tgz
npm http 200 https://registry.npmjs.org/colors/-/colors-0.6.0-1.tgz
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/di
npm http GET https://registry.npmjs.org/chokidar
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/chokidar

> chokidar@0.8.1 postinstall /usr/local/share/npm/lib/node_modules/karma/node_modules/chokidar
> node setup-deps.js

Executing npm install fsevents@0.1.6 recursive-readdir@0.0.2
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/socket.io-client/0.9.16
npm http GET https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/redis/0.7.3
npm http GET https://registry.npmjs.org/base64id/0.1.0
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/inherits
npm http GET https://registry.npmjs.org/async/0.1.15
npm http GET https://registry.npmjs.org/readable-stream
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/utile
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/pkginfo
npm http 304 https://registry.npmjs.org/socket.io-client/0.9.16
npm http 304 https://registry.npmjs.org/base64id/0.1.0
npm http 304 https://registry.npmjs.org/policyfile/0.0.4
npm http GET https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz
npm http GET https://registry.npmjs.org/qs/0.6.5
npm http GET https://registry.npmjs.org/formidable/1.0.14
npm http GET https://registry.npmjs.org/cookie-signature/1.0.1
npm http GET https://registry.npmjs.org/buffer-crc32/0.2.1
npm http GET https://registry.npmjs.org/cookie/0.1.0
npm http GET https://registry.npmjs.org/send/0.1.4
npm http GET https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz
npm http GET https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz
npm http GET https://registry.npmjs.org/bytes/0.2.0
npm http GET https://registry.npmjs.org/fresh/0.2.0
npm http GET https://registry.npmjs.org/pause/0.0.1
npm http GET https://registry.npmjs.org/uid2/0.0.2
npm http GET https://registry.npmjs.org/methods/0.0.1
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/lru-cache
npm http 200 https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz
npm http 200 https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz
npm http 200 https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz
npm http 304 https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/utile
npm http 304 https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/utile/-/utile-0.2.1.tgz
npm http 304 https://registry.npmjs.org/async/0.1.15
npm http GET https://registry.npmjs.org/async/-/async-0.1.15.tgz
npm http 304 https://registry.npmjs.org/readable-stream
npm http 200 https://registry.npmjs.org/utile/-/utile-0.2.1.tgz
npm http 200 https://registry.npmjs.org/async/-/async-0.1.15.tgz
npm http 304 https://registry.npmjs.org/pkginfo
npm http 304 https://registry.npmjs.org/qs/0.6.5
npm http 304 https://registry.npmjs.org/cookie-signature/1.0.1
npm http GET https://registry.npmjs.org/qs/-/qs-0.6.5.tgz
npm http GET https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.1.tgz
npm http 304 https://registry.npmjs.org/formidable/1.0.14
npm http GET https://registry.npmjs.org/formidable/-/formidable-1.0.14.tgz
npm http 304 https://registry.npmjs.org/buffer-crc32/0.2.1
npm http GET https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.1.tgz
npm http 200 https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.1.tgz
npm http 200 https://registry.npmjs.org/qs/-/qs-0.6.5.tgz
npm http 200 https://registry.npmjs.org/formidable/-/formidable-1.0.14.tgz
npm http 304 https://registry.npmjs.org/cookie/0.1.0
npm http 304 https://registry.npmjs.org/send/0.1.4
npm http 304 https://registry.npmjs.org/bytes/0.2.0
npm http GET https://registry.npmjs.org/cookie/-/cookie-0.1.0.tgz
npm http GET https://registry.npmjs.org/send/-/send-0.1.4.tgz
npm http GET https://registry.npmjs.org/bytes/-/bytes-0.2.0.tgz
npm http 304 https://registry.npmjs.org/pause/0.0.1
npm http 304 https://registry.npmjs.org/fresh/0.2.0
npm http GET https://registry.npmjs.org/pause/-/pause-0.0.1.tgz
npm http GET https://registry.npmjs.org/fresh/-/fresh-0.2.0.tgz
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/deep-equal
npm http GET https://registry.npmjs.org/i
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/ncp
npm ERR! fetch failed https://registry.npmjs.org/cookie/-/cookie-0.1.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/send/-/send-0.1.4.tgz
npm http GET https://registry.npmjs.org/minimist
npm http 200 https://registry.npmjs.org/bytes/-/bytes-0.2.0.tgz
npm http 304 https://registry.npmjs.org/uid2/0.0.2
npm http 304 https://registry.npmjs.org/methods/0.0.1
npm http 304 https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/methods/-/methods-0.0.1.tgz
npm http GET https://registry.npmjs.org/uid2/-/uid2-0.0.2.tgz
npm http 200 https://registry.npmjs.org/pause/-/pause-0.0.1.tgz
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/i
npm http 304 https://registry.npmjs.org/deep-equal
npm http 304 https://registry.npmjs.org/mkdirp
npm http 200 https://registry.npmjs.org/methods/-/methods-0.0.1.tgz
npm http 200 https://registry.npmjs.org/uid2/-/uid2-0.0.2.tgz
npm http 304 https://registry.npmjs.org/ncp
npm http 304 https://registry.npmjs.org/async
npm http 200 https://registry.npmjs.org/fresh/-/fresh-0.2.0.tgz
npm http GET https://registry.npmjs.org/string_decoder
npm http 304 https://registry.npmjs.org/minimist
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/redis/0.7.3
npm http 304 https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.1.tgz
npm http GET https://registry.npmjs.org/cookie/-/cookie-0.1.0.tgz
npm http GET https://registry.npmjs.org/send/-/send-0.1.4.tgz
npm ERR! fetch failed https://registry.npmjs.org/cookie/-/cookie-0.1.0.tgz
npm http 200 https://registry.npmjs.org/send/-/send-0.1.4.tgz
npm http GET https://registry.npmjs.org/string_decoder
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/redis/0.7.3
npm http 304 https://registry.npmjs.org/redis/0.7.3
npm http GET https://registry.npmjs.org/redis/-/redis-0.7.3.tgz
npm ERR! fetch failed https://registry.npmjs.org/redis/-/redis-0.7.3.tgz
npm http GET https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.1.tgz
npm http GET https://registry.npmjs.org/recursive-readdir/0.0.2
npm http GET https://registry.npmjs.org/fsevents/0.1.6
npm http 304 https://registry.npmjs.org/recursive-readdir/0.0.2
npm http GET https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-0.0.2.tgz
npm ERR! fetch failed https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-0.0.2.tgz
npm http GET https://registry.npmjs.org/fsevents/0.1.6
npm http GET https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-0.0.2.tgz
npm ERR! fetch failed https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-0.0.2.tgz
npm http GET https://registry.npmjs.org/fsevents/0.1.6
npm http GET https://registry.npmjs.org/fsevents/-/fsevents-0.1.6.tgz
npm http 200 https://registry.npmjs.org/fsevents/-/fsevents-0.1.6.tgz
npm http GET https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-0.0.2.tgz
npm ERR! fetch failed https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-0.0.2.tgz
npm ERR! Error: SELF_SIGNED_CERT_IN_CHAIN
npm ERR!     at SecurePair.<anonymous> (tls.js:1349:32)
npm ERR!     at SecurePair.EventEmitter.emit (events.js:92:17)
npm ERR!     at SecurePair.maybeInitFinished (tls.js:962:10)
npm ERR!     at CleartextStream.read [as _read] (tls.js:463:15)
npm ERR!     at CleartextStream.Readable.read (_stream_readable.js:320:10)
npm ERR!     at EncryptedStream.write [as _write] (tls.js:366:25)
npm ERR!     at doWrite (_stream_writable.js:219:10)
npm ERR!     at writeOrBuffer (_stream_writable.js:209:5)
npm ERR!     at EncryptedStream.Writable.write (_stream_writable.js:180:11)
npm ERR!     at write (_stream_readable.js:573:24)
npm ERR!     at flow (_stream_readable.js:582:7)
npm ERR!     at Socket.pipeOnReadable (_stream_readable.js:614:5)
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 Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.13/bin/node" "/usr/local/Cellar/node/0.10.13/bin/npm" "install" "fsevents@0.1.6" "recursive-readdir@0.0.2"
npm ERR! cwd /usr/local/share/npm/lib/node_modules/karma/node_modules/chokidar
npm ERR! node -v v0.10.13
npm ERR! npm -v 1.3.2
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /usr/local/share/npm/lib/node_modules/karma/node_modules/chokidar/npm-debug.log
npm ERR! not ok code 0
npm ERR! fetch failed https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.1.tgz
unbuild connect@2.8.8
unbuild karma@0.10.9
npm ERR! Error: SELF_SIGNED_CERT_IN_CHAIN
npm ERR!     at SecurePair.<anonymous> (tls.js:1349:32)
npm ERR!     at SecurePair.EventEmitter.emit (events.js:92:17)
npm ERR!     at SecurePair.maybeInitFinished (tls.js:962:10)
npm ERR!     at CleartextStream.read [as _read] (tls.js:463:15)
npm ERR!     at CleartextStream.Readable.read (_stream_readable.js:320:10)
npm ERR!     at EncryptedStream.write [as _write] (tls.js:366:25)
npm ERR!     at doWrite (_stream_writable.js:219:10)
npm ERR!     at writeOrBuffer (_stream_writable.js:209:5)
npm ERR!     at EncryptedStream.Writable.write (_stream_writable.js:180:11)
npm ERR!     at write (_stream_readable.js:573:24)
npm ERR!     at flow (_stream_readable.js:582:7)
npm ERR!     at Socket.pipeOnReadable (_stream_readable.js:614:5)
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 Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.13/bin/node" "/usr/local/bin/npm" "install" "-g" "karma"
npm ERR! cwd /Users/Alex/Documents/Bitbucket
npm ERR! node -v v0.10.13
npm ERR! npm -v 1.3.2
npm http GET https://registry.npmjs.org/cookie/-/cookie-0.1.0.tgz
npm ERR! fetch failed https://registry.npmjs.org/cookie/-/cookie-0.1.0.tgz
npm http GET https://registry.npmjs.org/string_decoder
npm http GET https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25-1.tgz
npm ERR! fetch failed https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25-1.tgz
npm http GET https://registry.npmjs.org/redis/-/redis-0.7.3.tgz
npm ERR! fetch failed https://registry.npmjs.org/redis/-/redis-0.7.3.tgz
npm http GET https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25-1.tgz
npm http 200 https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.25-1.tgz
npm http GET https://registry.npmjs.org/redis/-/redis-0.7.3.tgz
npm ERR! fetch failed https://registry.npmjs.org/redis/-/redis-0.7.3.tgz
npm WARN optional dep failed, continuing redis@0.7.3
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http GET https://registry.npmjs.org/ws
npm http 200 https://registry.npmjs.org/xmlhttprequest/1.4.2
npm http 200 https://registry.npmjs.org/active-x-obfuscator/0.0.1
npm http GET https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
npm http GET https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscator-0.0.1.tgz
npm ERR! fetch failed https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
npm ERR! fetch failed https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscator-0.0.1.tgz
npm http GET https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/ws
npm http 200 https://registry.npmjs.org/uglify-js/1.2.5
npm http GET https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz
npm http GET https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
npm http GET https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscator-0.0.1.tgz
npm http 304 https://registry.npmjs.org/ws
npm ERR! fetch failed https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz
npm ERR! fetch failed https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscator-0.0.1.tgz
npm http 200 https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz
npm http GET https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz
npm http 200 https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz
npm http GET https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscator-0.0.1.tgz
npm http 200 https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscator-0.0.1.tgz
npm http GET https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/options
npm http GET https://registry.npmjs.org/nan
npm http 200 https://registry.npmjs.org/zeparser/0.0.5
npm http GET https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
npm ERR! fetch failed https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
npm http 304 https://registry.npmjs.org/nan
npm http 200 https://registry.npmjs.org/options
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
npm ERR! fetch failed https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/tinycolor
npm http 200 https://registry.npmjs.org/commander

> ws@0.4.31 install /usr/local/share/npm/lib/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

npm http GET https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
npm ERR! fetch failed https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz
unbuild active-x-obfuscator@0.0.1
unbuild socket.io-client@0.9.16
unbuild socket.io@0.9.16
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/Alex/Documents/Bitbucket/npm-debug.log
npm ERR! not ok code 0

Any ideas? Thanks.

UPDATE: Using the mirror provided below I have installed Karma but I think I have a bigger issue.

A common error I'm seeing in logs from trying to install dependencies and other packages is:

npm ERR! Error: SELF_SIGNED_CERT_IN_CHAIN
npm ERR!     at SecurePair.<anonymous> (tls.js:1370:32)
npm ERR!     at SecurePair.EventEmitter.emit (events.js:92:17)
npm ERR!     at SecurePair.maybeInitFinished (tls.js:982:10)
npm ERR!     at CleartextStream.read [as _read] (tls.js:469:13)
npm ERR!     at CleartextStream.Readable.read (_stream_readable.js:320:10)
npm ERR!     at EncryptedStream.write [as _write] (tls.js:366:25)
npm ERR!     at doWrite (_stream_writable.js:221:10)
npm ERR!     at writeOrBuffer (_stream_writable.js:211:5)
npm ERR!     at EncryptedStream.Writable.write (_stream_writable.js:180:11)
npm ERR!     at write (_stream_readable.js:583:24)
npm ERR!     at flow (_stream_readable.js:592:7)
npm ERR!     at Socket.pipeOnReadable (_stream_readable.js:624:5)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/isaacs/npm/issues>
Alex B
  • 1,009
  • 3
  • 18
  • 26

3 Answers3

4

1) Try installing it from a mirror:

sudo npm install --registry http://registry.npmjs.eu -g karma

2) As for the other error try this:

npm config set strict-ssl false

See: receiving error: 'Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN' while using npm

Community
  • 1
  • 1
Ilan Frumer
  • 32,059
  • 8
  • 70
  • 84
4

Don't use http

or disable ssl

Please don't use the strict-ssl false option stated in the other answer. This will ignore ssl checks. Hence is not safe!

Official solution

Instead go for the official solution from NPM.

First try updating npm itself.

npm install npm -g

Otherwise tell your current version of npm to use known registrars

npm config set ca ""

source for all this goodness is http://blog.npmjs.org/post/78085451721/npms-self-signed-certificate-is-no-more

hcpl
  • 17,382
  • 7
  • 72
  • 73
  • This solution worked well for us! We didn't like the idea of turning off strict-ssl. Also, we found that we needed to use set ca before having npm update itself. After that, karma and others installed correctly. – J Burnett Feb 28 '14 at 15:55
  • You say "don't use the `strict-ssl false`" option, and then say to "`set ca ""`"; you're effectively doing the same thing, your method is arguably MORE insecure. Not saying it won't work, but just for anyone reading this, you're still bypassing ssl security by doing this. – bschlueter Apr 18 '14 at 15:01
  • @bschlueter this is not my solution but the one from node. Also the set ca command is only in case the npm update itself wouldn't help. The best and safe solution is the update only. Not the 2 combined. – hcpl Apr 18 '14 at 16:26
1

npm acknowledged this error on their blog: http://blog.npmjs.org/post/78085451721/npms-self-signed-certificate-is-no-more

The solution: either

1) upgrade your version of npm

npm install npm -g - or -

2) tell your current version of npm to use known registrars

npm config set ca ""

Guillaume Flandre
  • 8,936
  • 8
  • 46
  • 54
  • The first did not work for me. I get an UNTRUSTED error when subsequently installing karma. The 2nd seems to work. Thanks for the notification! – Alex B Mar 03 '14 at 13:49