Given
Project: https://github.com/digital-dj-tools/mp3-parser
pkg version: 4.4.0
pkg targets: node10-win-x64,node10-macos-x64,node10-linux-x64
npm install
clojure -Acompile-cljs
npm run build
Expected
The Windows and Linux generated executables run ok (I can't test the Macos executable, I don't have a Mac).
Actual
The Linux executable runs successfully, but the Windows executable does not.
From Bash (WSL)
/mnt/d/Projects/mp3-parser/pkg$ ./mp3-parser-linux ./test-resources/lame-mp3-cbr-stereo-44100khz-192kbps-id3v2.mp3
<generates correct output>
From CMD (Windows)
D:\Projects\mp3-parser\pkg>mp3-parser-win.exe ..\test-resources\lame-mp3-cbr-stereo-44100khz-192kbps-id3v2.mp3
<no output>
D:\Projects\mp3-parser\pkg>echo %errorlevel%
-1073741819
However, if I change targets to node8-win-x64,node8-macos-x64,node8-linux-x64, the Windows and Linux generated executables run ok.
Why do some of the generated executables (Windows) not run successfully with Node 10?
I'm seeing the same issue when targetting node10-win-x86
When running an exe packaged with 4.4.0 I see an error
Pkg: Error reading from file
It works correctly when packaged with 4.3.8
Yes, there is a compatibility issue with node@10 and [email protected]. It will work with [email protected] or [email protected].
I confirm, that using [email protected] will fail to produce an exe for windows 10. Using same config and module with [email protected] works.
thanks @rao123dk
Same for newer 4.4.x releases
I can confirm I could successfully compile a Mac target from Windows using [email protected]. I had to chmod +x the file on the Mac, though.
I had exact same problem and it solved with command below:
pkg ./dist/index.js --target node12-win-x64 --options max_old_space_size=4096
I faced the same problem!
Most helpful comment
Yes, there is a compatibility issue with node@10 and [email protected]. It will work with [email protected] or [email protected].