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

Uncaught TypeError on browserified telehash.generate() #34

Open
iaaaan opened this issue Mar 23, 2015 · 2 comments
Open

Uncaught TypeError on browserified telehash.generate() #34

iaaaan opened this issue Mar 23, 2015 · 2 comments

Comments

@iaaaan
Copy link

iaaaan commented Mar 23, 2015

Hi,

I've been trying to get telehash-js to work in the browser without success.
After browserifying the source and running the example, I get the following error on telehash.generate():

TypeError: sodium.crypto_box_keypair is not a function
in bundle.js:32074

Of course I don't have any problem running this in node. This might be me missing something, but I've been stuck for a few days so I figured I might ask.

Thank you for your great work! it's very exciting stuff.

@quartzjer
Copy link
Member

Hmm, that shouldn't be getting included at all in the browserify build (yet), this is a just a temporary test workaround but could you see if this works, putting this before the generate?

require('e3x').cs['3a'].generate = false;

The browser/browserify build is still pretty young, I'm really rusty on the browser side of things so all/any suggestions very welcomed :)

@iaaaan
Copy link
Author

iaaaan commented Mar 25, 2015

It fixed it! :)
I am still playing around at this stage but later on if I can be helpful regarding the browser side of things I will definitely let you know.

Thanks a lot!

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