Skip to content

SEA with Native module 'uWebSockets' compiled on Windows - doesn't work, on Linux - OK #123

Description

@ds315

Hi,

It's crashes on dlopen()

NodeJS 24.2.0
uWebSockets 20.52.0

server.js:

const { dlopen } = require('node:process');
const lib = {exports: {}};

console.log('loading uws ...');
dlopen(lib, 'node_modules/uWebSockets.js/uws_win32_x64_137.node');
console.log('uws loaded');

lib.exports.App()
.get('/*', res => res.end('Hi'))
.listen(3000, token => console.log(token ? 'Listening' : 'Failed to listen', 'to port 3000'));

node server.js - work OK

after building - doesn't start, only 'loading uws ...'

sea.json:

{
	"main": "server.js",
	"output": "sea.blob",
	"assets": {
		"uws_win32_x64_137.node": "node_modules/uWebSockets.js/uws_win32_x64_137.node"
	}
}

It would be good to uWS can work with SEA on Windows

PS: native module bcrypt - works OK on Windows and Linux

Activity

  1. ds315 commented on Jun 18, 2025

    @ds315
    Author

    tried to use pkg

    after building -> run server.exe -> message 'loading uws ...' -> Error: Module did not self-register: 'node_modules/uWebSockets.js/uws_win32_x64_137.node'.

    May be it some helps

    PS: bcrypt - OK

  2. cspotcode commented on Feb 16, 2026

    @cspotcode

    bun build --compile claims to support bundling .node native addons. Does it work?

    https://bun.com/docs/bundler/executables#embed-n-api-addons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions