-
Notifications
You must be signed in to change notification settings - Fork 64
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
Issue with crypto library with Next.Js #197
Comments
@smooth55dev Now I’m getting:
Is that documented anywhere? I mean, how to pass arguments to init() ? |
Thanks @smooth55dev for such a thorrow reply. I’ve follow your guidance, but it still doesn’t work. Now with a slightly different message:
I’ve read that for NextJs app, file may not be availble within the .next folder, so I moved the wasm file to the pubic folder. I made sure "/wasm/iroha_crypto_bg.8bf5c350.wasm” is accessible. But it still fails to parse it. |
Hey @matisalimbene! That ChatGPT-fellow doesn't have any affiliation with the project. I have a very limited experience with Next.js, but I guess the issue might be similar to #104. Could you try the workaround mentioned there? (maybe adapting it to Next.js specific syntax). |
@0x009922 Thanks! I think it may be something related to Next.Js and how it handles WASM. I tried the fix you refer to, but I get:
I also tried copying the wasm file in the public next.js folder (used for static assets) and use a relative path to the wasm file, but then I get:
|
@matisalimbene can you try using If that doesn't work, then I'll need to investigate and experiment with Nest.js in order to make crypto work. |
It seems to have different implementation (no init)
i’ll continue to check the link you provided, I’m not that familiar with wasm. |
Yes, the |
I'm working on a Next.Js app, trying to display realtime information following the sample in (https://hyperledger.github.io/iroha-2-docs/guide/get-started/javascript.html#_8-visualizing-outputs-in-web-ui).
Im using CommonJS, this is my code to initialize the crypto library:
but when start the app, I get this error:
The
init
is failing so the crypto module fails to load. Any ideas?The text was updated successfully, but these errors were encountered: