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

Using the SDK in browser environment not working #71

Open
daniel-soli opened this issue Jul 7, 2023 · 1 comment
Open

Using the SDK in browser environment not working #71

daniel-soli opened this issue Jul 7, 2023 · 1 comment

Comments

@daniel-soli
Copy link

daniel-soli commented Jul 7, 2023

I'm running a browser environment Vue application. When using the SDK it does not work because of "type": "module" in the package.json file. When running with this I get a "reuire not defined".
When removing that line manually in the sdk, everything works locally, but this does not work when deploying ofc.

Are there any reason for type module, since AFAIK it just got added in 3.3.8 ->?
Any tips on how to get it to work in browser environment?

I also noticed that permutation.ts uses require for blake2b, is it possible to set this up to be browserfriendly?

@daniel-soli
Copy link
Author

I had to fork this repo to do the changes and publish my own package. The two "issues" mentioned above seemed to get it working.

  • import { default as blake2b} from 'blake2b'; in permutation.ts
  • package.json - remove "type": "module"

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

1 participant