I have tested using the following:
import DecompressZip from 'decompress-zip'
import extract from 'extract-zip'
import path from 'path'
extract('ngrok.zip', { dir: path.resolve('~/ezip')}).then(_ => console.log('DONE'))
var unzipper = new DecompressZip('ngrok.zip')
unzipper.on('error', function (err) {
console.log('Caught an error');
});
unzipper.on('extract', function (log) {
console.log('Finished extracting');
});
unzipper.on('progress', function (fileIndex, fileCount) {
console.log('Extracted file ' + (fileIndex + 1) + ' of ' + fileCount);
});
unzipper.extract();
The ngrok in ./ezip/ngrok works but the one extracted using decompress-zip fails results in:
./ngrok
[1] 52121 killed ./ngrok
I'm on MacOS 11.6 (Big Sur)