Open mikeseese opened 3 months ago
I've tested as far back as https://github.com/uNetworking/uWebSockets.js/releases/tag/v20.22.0 (April 2023) and still see the same stack trace; this isn't a recent regression in uWS.
Unfortunately I cannot do much here, could be something related to the patched node version we are using, would be curious to check if the same happens with other arch/os
Sounds good. I no longer need it as I reverted away from using uWS for now, so I'm not sure if I'm inclined to dive into debugging the Node runtime to figure out what's causing the error. The next time I want to package uWS will either be when Bun is more mature or Node SEA is stable 🤷.
At a minimum, keeping this issue open could help others find the blocker if they run into the same scenario.
Yeah I'm keeping an eye on Node SEA too as I think that's the future but I'm not sure if and when it will be mature enough to work out of the box like pkg does :(
What I'm missing right now from SEA is an easy way to handle .node
native addons and other assets, when that's working using it paired with esbuild to bundle everything on a single file could be an option, then it would be good to skip the esbuild step (that could be hard to configure on complex app) and let SEA find all the files to bundle and create the exe like pkg does
What version of pkg are you using?
5.12.0
What version of Node.js are you using?
18.20.3
What operating system are you using?
Windows
What CPU architecture are you using?
x86_64
What Node versions, OSs and CPU architectures are you building for?
node18-win-x64
Describe the Bug
If I create a bundled exe with pkg that includes https://github.com/uNetworking/uWebSockets.js, simply just requiring the module, there is a segfault. I've noticed this issue for Node20 (target of Node20) and 18. I haven't tried other versions.
This error doesn't occur when running in Node without pkg, so my guess is the uWS author will state this is an issue with pkg.
Here is the stack trace I'm seeing:
Expected Behavior
To not crash when loading
uWebSockets.js
.To Reproduce
yarn
yarn test
Note the segfault stack trace printed out instead of seeing
hello
printed to the screen.