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

Buffer is not defined in browser #49

Open
panick-carousel opened this issue Jul 30, 2021 · 2 comments
Open

Buffer is not defined in browser #49

panick-carousel opened this issue Jul 30, 2021 · 2 comments

Comments

@panick-carousel
Copy link

panick-carousel commented Jul 30, 2021

In this code file: https://github.com/paragonie/sodium-plus/blob/master/lib/keytypes/ed25519sk.js#L17 a reference is made to the global Buffer object.

When using in a browser bundler that does not shim nodejs builtins, like vite, this code fails.

The fix is importing from 'buffer' library, which is listed in the dependencies of sodium-plus.

Thank you for this super useful library too - makes life much easier !

@WilliamGaudfrin
Copy link

I fixed this in my Pull request #52

I hope it will be merged soon! 😄

@Karmabir-Brahma
Copy link

Thank you @WilliamGaudfrin

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

3 participants