shama / napa

:wine_glass: A helper for installing stuff without a package.json with npm.
MIT License
413 stars 34 forks source link

Zip/tar.gz error #60

Closed MindFreeze closed 8 years ago

MindFreeze commented 8 years ago

When I try to install a zip or tar.gz I get this error:

info download https://github.com/openseadragon/openseadragon/releases/download/v2.0.0/openseadragon-bin-2.0.0.zip into openseadragon
info git https://github.com/fabiobiondi/angular-fullscreen into angular-fullscreen
info git https://github.com/lodash/lodash.git into lodash-frontend

/home/www/pic-pixel/node_modules/napa/node_modules/download/node_modules/each-async/node_modules/onetime/index.js:15
throw new Error(fnName + ' can only be called once.');
^
Error: callback() can only be called once.
at DuplexWrapper.<anonymous> (/home/www/pic-pixel/node_modules/napa/node_modules/download/node_modules/each-async/node_modules/onetime/index.js:15:11)
at DuplexWrapper.EventEmitter.emit (events.js:95:17)
at readableAddChunk (/home/www/pic-pixel/node_modules/napa/node_modules/download/node_modules/readable-stream/lib/_stream_readable.js:178:12)
at DuplexWrapper.Readable.push (/home/www/pic-pixel/node_modules/napa/node_modules/download/node_modules/readable-stream/lib/_stream_readable.js:162:10)
at DestroyableTransform.<anonymous> (/home/www/pic-pixel/node_modules/napa/node_modules/download/node_modules/stream-combiner2/node_modules/duplexer2/index.js:50:15)
at DestroyableTransform.EventEmitter.emit (events.js:95:17)
at DestroyableTransform.<anonymous> (/home/www/pic-pixel/node_modules/napa/node_modules/download/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:786:14)
at DestroyableTransform.EventEmitter.emit (events.js:92:17)
at emitReadable_ (/home/www/pic-pixel/node_modules/napa/node_modules/download/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:448:10)
at emitReadable (/home/www/pic-pixel/node_modules/napa/node_modules/download/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:444:5)
shama commented 8 years ago

@MindFreeze Which version of napa? Could you try npm cache clean && rm -rf node_modules && npm i napa@latest && npm i?

MindFreeze commented 8 years ago

Nope. Did not help. Versions I've tried: Napa: 2.0.0 , 2.0.1 Nodejs: 4.0.0 , 4.1.1, 4.1.2

I haven't tried another zipped package, so maybe it is related to https://github.com/openseadragon/openseadragon/releases/download/v2.0.0/openseadragon-bin-2.0.0.zip and the same one with .tar.gz extension.

P.S. I saw this same bug in a few other packages, so maybe it is a problem with one of napa's dependencies and updating them could fix it.

LoicMahieu commented 8 years ago

I confirm:

info download https://github.com/gwatts/jquery.sparkline/archive/v2.1.2.tar.gz into jquery.sparkline
/Users/loicmahieu/Repos/iGLOO/.../node_modules/onetime/index.js:15
                throw new Error(fnName + ' can only be called once.');
                ^

Node: v4.2.1 Napa: v2.0.1

caseyWebb commented 8 years ago

Updating download to the latest version solves.

caseyWebb commented 8 years ago

@MindFreeze, @LoicMahieu napa v2.0.2 should work for ya

MindFreeze commented 8 years ago

Confirm. v2.0.2 fixes it.

caseyWebb commented 8 years ago

:+1: