mixu / npm_lazy

A lazy local cache for NPM to make your local deploys faster
http://mixu.net/npm_lazy/
Other
753 stars 72 forks source link

Cannot call method 'on' of undefined (Windows) #6

Open fresheneesz opened 10 years ago

fresheneesz commented 10 years ago

I ran the server, ran npm --registry http://localhost:8080 install on one of my packages, and the server crashed pretty quickly:

C:\Users\billy\Desktop\Stuff\git\npm_lazy>node server.js
npm_lazy at localhost port 8080
Forcing index refresh, last update: never max age: Mon Nov 04 2013 13:35:15 GMT-0800 (Pacific Standard Time)
Cache miss:  proto index.json , GET http://registry.npmjs.org/proto
Forcing index refresh, last update: never max age: Mon Nov 04 2013 13:35:15 GMT-0800 (Pacific Standard Time)
Cache miss:  imap index.json , GET http://registry.npmjs.org/imap

C:\Users\billy\Desktop\Stuff\git\npm_lazy\lib\cache.js:116
        res.on('error', function(err) {
            ^
TypeError: Cannot call method 'on' of undefined
    at C:\Users\billy\Desktop\Stuff\git\npm_lazy\lib\cache.js:116:13
    at ClientRequest.<anonymous> (C:\Users\billy\Desktop\Stuff\git\npm_lazy\node_modules\mixu_minimal\client.js:31:46)
    at ClientRequest.EventEmitter.emit (events.js:95:17)
    at Socket.socketOnEnd [as onend] (http.js:1569:9)
    at Socket.g (events.js:175:14)
    at Socket.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:920:16
    at process._tickCallback (node.js:415:13)
jpbochi commented 10 years ago

I'm running on a Mac OX 10.9 and got exactly the same exception on a slightly different circumstance. See #8

PixnBits commented 10 years ago

@fresheneesz #8 is now closed, IDK about releases but maybe run this again?