node.js - Nodejs npm install karma -
when installed karma in nodejs modules, in log written this:
npm http 304 https registry.npmjs.org/proto-list > phantomjs@1.9.1-5 install c:\users\<user>\appdata\roaming\npm\node_modules\karma-phantomjs-launcher\node_modules\phantomjs > node install.js downloading http://phantomjs.googlecode.com/files/phantomjs-1.9.1-windows.zip saving \tmp\phantomjs\phantomjs-1.9.1-windows.zip receiving... c:\users\<user>\appdata\roaming\npm\node_modules\karma-phantomjs-launcher\node_modules\phantomjs\install.js:215 deferred.reject('error http request: ' + util.inspect(response.head ^ referenceerror: util not defined @ clientrequest.<anonymous> (c:\users\<user>\appdata\roaming\npm\node_modules\karma-phantomjs-launcher\node_modules\phantomjs\install.js:215:53) @ clientrequest.g (events.js:175:14) @ clientrequest.eventemitter.emit (events.js:95:17) @ httpparser.parseronincomingclient [as onincoming] (http.js:1669:21) @ httpparser.parseronheaderscomplete [as onheaderscomplete] (http.js:120:23) @ socket.socketondata [as ondata] (http.js:1564:20) @ tcp.onread (net.js:525:27) npm err! weird error 8 npm err! not ok code 0 d:\nodejs>npm install util npm http 304 https registry.npmjs.org/events.node util@0.4.9 node_modules\util └── events.node@0.4.9 module util installed. why karma not installing?
i had similar error (on linux though). thing this:
phantomjs comes it's own "installer" install.js fetching precompiled phantomjs binaries temporary directory , unzips them somewhere inside node_modules directory.
i had export tmpdir variable because /tmp not writable. in case looks \tmp fallback doesn't cut (it's windows after all). try setting tmpdir point existing directory , run npm install again.
good luck!
ps: can extend answer instructions on how set environment variables on windows?
Comments
Post a Comment