Skip to content

Instantly share code, notes, and snippets.

@fxp
Created August 14, 2013 14:33
Show Gist options
  • Select an option

  • Save fxp/6231619 to your computer and use it in GitHub Desktop.

Select an option

Save fxp/6231619 to your computer and use it in GitHub Desktop.
error when install karma "$ sudo npm -g install karma" because chinese gov blocked googlecode.com.
> phantomjs@1.9.1-4 install /usr/local/lib/node_modules/karma-phantomjs-launcher/node_modules/phantomjs
> node install.js
Downloading http://phantomjs.googlecode.com/files/phantomjs-1.9.1-macosx.zip
Saving to /usr/local/lib/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/phantomjs/phantomjs-1.9.1-macosx.zip
Receiving...
/usr/local/lib/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/install.js:215
deferred.reject('Error with http request: ' + util.inspect(response.head
^
ReferenceError: util is not defined
at ClientRequest.<anonymous> (/usr/local/lib/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/install.js:215:53)
at ClientRequest.g (events.js:175:14)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1658:21)
at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:119:23)
at Socket.socketOnData [as ondata] (http.js:1553:20)
at TCP.onread (net.js:525:27)
npm ERR! weird error 8
npm ERR! not ok code 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment