Open bperel opened 8 years ago
If I rollback to 0.6.4 I have no error
I just found out that 0.6.5 does create archives with no node_modules/bower_components/etc structure inside an archive, ie plain structure is placed into the archive. Previous versions created modules structure inside the archives. So looks like a bug or absence of the backward compatibility (in this case it will probably become working after dropping existing cache).
Also currently new library is used for archives unpacking, so there is a chance that this new archiving library does not support existing archives created with previously used archiving library.
I just checked, 0.6.5 doesn't handle archives created by previous versions, got the same error as in first message. But it works well with archives created by itself, so looks like a backward compatibility issue.
3 issues which I'm going to handle:
.pipe(zlib.createGunzip())
is not needed for the archives created by the previous version, since those archives are deflate
archives, such behavior will eliminate zlib.js:363:17
error.targetPath
, not to the installDirectory
All archives created by the 0.6.5 version will have to be invalidated and removed.
This is a PR with quick fix https://github.com/swarajban/npm-cache/pull/84
@bperel would be fine you confirm that fix works for you, thanks.
LGTM
Since npm-cache 0.6.5 I get the following during the archive installation step, both with NPM and Composer dependencies :