has anybody found that installing lumo on CI fails with:
npm install -g lumo-cljs --unsafe-perm
/bin/bash --noprofile --norc /opt/vsts/work/_temp/f61d6d50-8a9a-464b-b529-5b4562787990.sh
/usr/local/bin/lumo -> /usr/local/lib/node_modules/lumo-cljs/bin/lumo.js
> lumo-cljs@1.8.0 install /usr/local/lib/node_modules/lumo-cljs
> node scripts/npm_install.js || nodejs scripts/npm_install.js
/usr/local/lib/node_modules/lumo-cljs/node_modules/jszip/lib/zipEntries.js:176
throw new Error("Corrupted zip : can't find end of central directory");
^
Error: Corrupted zip : can't find end of central directory
at ZipEntries.readEndOfCentral (/usr/local/lib/node_modules/lumo-cljs/node_modules/jszip/lib/zipEntries.js:176:23)
at ZipEntries.load (/usr/local/lib/node_modules/lumo-cljs/node_modules/jszip/lib/zipEntries.js:274:14)
at new ZipEntries (/usr/local/lib/node_modules/lumo-cljs/node_modules/jszip/lib/zipEntries.js:22:14)
at JSZip.module.exports [as load] (/usr/local/lib/node_modules/lumo-cljs/node_modules/jszip/lib/load.js:19:18)
at Request.<anonymous> (/usr/local/lib/node_modules/lumo-cljs/scripts/npm_install.js:65:28)
at emitOne (events.js:121:20)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/lumo-cljs/node_modules/request/request.js:1091:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
?@anmonteiro any hint on the above? our CI is failing 50% of the times
it looks like there is a fix with the new JSZip
@richiardiandrea you can’t upgrade JSZip to the latest version
definitely not v3 at least
they removed the sync methods
we’re not using the async API
oh...I see
let me fetch the release that includes the fix
uhm weird, it says it should be included in 2.6.1
already
then it might not be the same bug
well it says it happens for large files...that is why I thought about it, lumo
now is 66MB...maybe we should drop it only in npm_install
? find something more reliable?
in there you are actually using the async api only, I guess the sync one is used inside the repl?
@richiardiandrea definitely
kk
if you find a better Zip library let me know
I wasn’t able to get one a couple years ago when doing Lumo at first
I will try to find it 😉
@anmonteiro Latest node supports gzip
: https://nodejs.org/api/zlib.html
seems pretty low level tdough
we use zlib
for gzip
already
AFAIK it doesn’t support zip archives
do we need to have a zip there? can it be a tar?
sorry I don’t follow
we use JSZip to unzip .jar
archives in Lumo
yep no that's fine sorry
npm_install.js
is what is failing
so I assume it is using JSZip because the CIs build zip files only?
oh i see
so that gzip
contains jars
mmmm, no I have just downloaded it 😄
very nice comparison here: https://nervous.io/node/javascript/2017/02/06/npm-unzip/
@anmonteiro https://github.com/anmonteiro/lumo/pull/383 will try it on Windows as well as Mac, we have many folks using lumo
here 😄
@richiardiandrea looks like that will just fail
you didn’t add the dependency under packages/lumo/package.json
Uhm no?
Oh sorry will do
@anmonteiro thanks done
@richiardiandrea can you revert the yarn.lock
changes please
sure maaan 😉
did you test the script?
yep
i.e. with npm install .
looks good:
~/tmp/lumo-asrasr$ ll node_modules/lumo/bin/lumo
-rwxr-xr-x 1 arichiardi arichiardi 65472307 Apr 6 13:47 node_modules/lumo/bin/lumo*
I asked a colleague to try on win and mac
thanks
looks like we can install on Mac, windows has some problem from the bash emulator
seems unrelated to the change
we are trying on a normal terminal
seems like a Windows weirdness when npm installing \some\folder
so I would say all good