Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update node-datachannel to 0.5.x #5

Open
ptrcnull opened this issue Dec 9, 2023 · 5 comments
Open

Update node-datachannel to 0.5.x #5

ptrcnull opened this issue Dec 9, 2023 · 5 comments

Comments

@ptrcnull
Copy link

ptrcnull commented Dec 9, 2023

0.5.0 fixes an issue when building from source on modern Linux systems: murat-dogan/node-datachannel#183

@pimterry
Copy link
Member

I am looking into this, but it's a little tricky, due to a) newly flaky tests in this repo (I think due to Chrome changes?) and b) node-datachannel 0.5.0+ moving to pure ESM, so it can't easily be used in CommonJS modules like this one.

Nothing insurmountable, but it might take a little while. Any PRs or testing to help work through those issues is very welcome 😄

@ptrcnull
Copy link
Author

so it can't easily be used in CommonJS modules like this one.

when setting up http toolkit server, hotpatching require to import in pre-compiled TS code:

const NodeDataChannel = import("node-datachannel");

worked for me just fine :p however, i'm not sure if that wouldn't require modernising the tsconfig to the new import method to work properly

@pimterry
Copy link
Member

😆 very neat. Probably not the solution I want to ship into production though I'm afraid! I'll let you know once I've got something working here.

@pimterry
Copy link
Member

Oh, to be clear: it's probably going to require converting this module to ESM too, as a new breaking release, so you might want to be prepared for that downstream.

@pimterry
Copy link
Member

I've just released v0.3.2, which uses the latest node-datachannel (without migrating to ESM, by using https://github.com/nktnet1/import-sync internally). @ptrcnull Can you test it out and let me know if that works for you now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants