-
Notifications
You must be signed in to change notification settings - Fork 27
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
Zstd-codec crashes in Node v20 and v22 due to deprecations #303
Comments
Hi @pimterry , thank you for reporting the issue.
Thanks! zstd-codec uses |
Hi @pimterry, I couldn't work on this issue for a while, sorry, The cause is here, CloneToVector invoked I could solve this by Emscripten's approach, but some tasks must be done because the build system is broken. |
Ah, that makes sense, ok. I tried to take a look myself but I didn't get very far, thanks so much for properly looking into this! 🙏 |
The deprecation warning about
I want to fix it but I couldn't find a quick solution. |
Amazing work, thanks @yoshihitoh! Yes, I've updated now, this issue is definitely resolved which is great, and otherwise it all seems to be working well so far 👍 Thanks for your help! ❤️ |
Hi @yoshihitoh.
For quite some time, zstd-codec has printed a
DeprecationWarning: Buffer() is deprecated due to security and usability issues.
warning when used in modern Node.Unfortunately due to nodejs/node#53075 this now crashes Node completely, making zstd-codec unusable in both LTS and current Node versions. A fix for that is coming, but not available yet (PR still pending), and regardless it would be good to fix this deprecation. You can reproduce this by running the tests from the
js
directory on the currentdevelop
branch with Node v22.3.0:I can see there's also a deprecation for use of
Punycode
that pops up here - I haven't seen that myself at runtime, so maybe it's from the test suite, but it might be nice to clean up too alongside this if that's easy.I'd love to get involved again and help get this fixed! Although in this case, I think that'll require some updating in the emscripten setup itself to avoid the
new Buffer
calls here and I'm not sure exactly how that part of the build works... Also, it looks like you're working on an upcoming v0.2.x release on another branch, butdevelop
still hasn't included those changes, so I'm not sure what state that v0.2.x code is in (I can't see how to run any tests there, for example).It's possible this is actually already fixed in v0.2.x, but I can't easily see how to check.
It'd be great to have this fixed, so if you can give me some pointers on where to get started on that I'm happy to dive in and help get zstd-codec working again.
The text was updated successfully, but these errors were encountered: