Closed Talaar closed 7 months ago
Tried with node 18? Does that throws too?
I tried node 16 and 18, same problem. Start the main.js in terminal with "node main.js" work fine.
No clue I'm sorry, you should check what check uWebsocket does in order to trigger that error and once you find it write a patch for that file so it doesn't throw on packaged version. I did this for many packages
Hm ... it's only a require
uws.js
module.exports = (() => {
try {
return require('./uws_' + process.platform + '_' + process.arch + '_' + process.versions.modules + '.node');
} catch (e) {
throw new Error('This version of uWS.js supports only Node.js LTS versions 16, 18 and 20 on (glibc) Linux, macOS and Windows, on Tier 1 platforms (https://github.com/nodejs/node/blob/master/BUILDING.md#platform-list).\n\n' + e.toString());
}
})();
@Talaar yeah but that's a dinamic require, that's why it is failing... see project readme
TLDR;: add uws_win32_x64_115.node
to assets
What version of pkg are you using?
5.11.1
What version of Node.js are you using?
20.10.0
What operating system are you using?
Win11
What CPU architecture are you using?
x86_64
What Node versions, OSs and CPU architectures are you building for?
node20-win-x64
Describe the Bug
I want to build a exe with hyper-express module that's use uWebsocket.js. PKG create the exe without problems but when i start the app then an error throws.
package.json
Expected Behavior
App starts correctly
To Reproduce
main.zip esbuild version of the main.ts