-
Notifications
You must be signed in to change notification settings - Fork 1k
Windows: Only REPL is started if package was compressed with UPX #121
Comments
Doesn't seem to be an issue with latest upx 3.94w. As long as you don't do |
I can reproduce on Mac OS with UPX 3.94 (using UPX reduces the executable size from 50MB to 13MB in my case, so that would be worth a fix. Note that executing the compressed-then-decompressed executable works as expected. |
@vweevers so it seems things work fine on Windows? This looks to be at least a macOS specific issue - I've not tested on Linux, but can back up @astefanutti that this is happening on macOS Sierra 10.12.6, upx 3.94 and pkg 4.2.4. |
Looks that way, yes. A confirmation from the OP @CherryDT would be nice. Then this issue (title) can be updated accordingly. |
I can confirm that with the latest pkg version in npm, it works fine with my original test case in Windows, I had version 3.0.6 when I encountered this issue, and now I successfully tested with version 4.2.2. (Only updating UPX didn't solve it, though.) |
I've just re-tested with pkg version 4.2.2 and UPX 3.94 on Mac OS Sierra and it still fails with the same error. I think the issue can be renamed according to those tests. |
I've tested it too with UPX 3.94 and pkg@4.2.2 on Linux Ubuntu 16.04. PS. I'm using a node-wrapper for upx. |
Still failing, upx 3.94 and pkg@4.2.4 on MacOS Sierra |
I'm having the same problem in arch linux. Using the command :
|
Question to the owners @igorklopov . upx guys are asking (upx/upx#2) :
Do you have this info? Thanks |
Adding to the pile, error on Amazon Linux AMI 2017.03, upx 3.9.4 This happens when I try to add any arguments, like (function (exports, require, module, __filename, __dirname) { ��ࡱ�
^
SyntaxError: Invalid or unexpected token
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:432:7)
at startup (bootstrap_node.js:192:9) |
On Arch Linux with
|
As an alternative to upx, I recommend gzexe ./build/uncompressed && mv ./build/uncompressed ./build/compressed && mv ./build/uncompressed~ ./build/uncompressed |
you may try a new toy pkgx |
Dupe of #1370. |
I'm using upx to reduce file size. Normally, any executable packed with UPX will behave the same as before. However, the Windows executables created by pkg seem to be broken afterwards, in that they seem to behave like
node
instead ofnode the_file.js
when run.The text was updated successfully, but these errors were encountered: