thejoshwolfe / yauzl

yet another unzip library for node
MIT License
681 stars 77 forks source link

bug and workaround when running from win executable created with pkg #122

Closed richwifunds closed 3 years ago

richwifunds commented 3 years ago

Create a node js file called tmp.js that simply references yauzl and prints a couple console statements.

console.log("start"); const yauzl = require('yauzl'); console.log("done")

Create windows executable with pkg (install with npm i pkg) - just run from bash shell.

pkg LaunchAgentStub.js --target node10-win-x64

Run on winx64 machine. "done" will not be printed.

Modify yauzl/index.js - replace references to "extraField.id" with "extraField.efid". Run again. This time "done" will be printed.

richwifunds commented 3 years ago

This was resolved by running pkg on a windows machine instead of mac.