-
Notifications
You must be signed in to change notification settings - Fork 24
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
createKeccakHash throws an error when run in bun #27
Comments
This sounds like an issue with Keep in mind that this library only supports NodeJS and the browser. |
|
|
It looks like Line 1 in cacd3a5
Perhaps bun doesn't support N-API native add-ons? Let me check... Answer: It does not support N-API, yet. One solution is to import the JS version directly. (this is difficult because it's not your direct dependency) import createKeccakHash from "keccak/js.js"; Another fix would be on our side. We can fall back to JS when native bindings don't load a function. |
I've opened up #28 but unfortunately I don't have publish rights to NPM. I only have merge rights to GitHub. So we'll have to wait for someone with NPM publish rights to merge and publish. |
We published a workaround in 3.0.4 bun shouldn't crash anymore for keccak. In hardhat specifically, they use |
I initially tried to run a script in a hardhat project using bun, however, that failed as explained in NomicFoundation/hardhat/issues/4383
@schaable pointed out that the issue was with this dependency package as
createKeccakHash("keccak256")
throws the following error:The text was updated successfully, but these errors were encountered: