We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Instantiating Surreal wasm within the Reactjs part of the Nextjs project causes an error:
Module build failed: UnhandledSchemeError: Reading from "node:crypto" is not handled by plugins (Unhandled scheme).
Create a NextJs app and instantiate the Surreal database within the page.tsx.
page.tsx
"use client" import {Surreal} from 'surrealdb.wasm'; export default function NameDoesntMatter() { prepareSurreal(); return(<p>demo</p>); } async function prepareSurreal() { let db = new Surreal(); try { await db.connect('memory'); await db.use({database: "db", namespace: "ns"}); } catch (error) { console.log(error) } }
I expect it to instantiate the database so that I can use in-memory one, on the browser.
I expect to be able to create a new user and query that user back.
surrealdb wasm 0.8.0 ubuntu 22.04.3 LST
No response
The text was updated successfully, but these errors were encountered:
any workarround for this problem ?
Sorry, something went wrong.
No branches or pull requests
Describe the bug
Instantiating Surreal wasm within the Reactjs part of the Nextjs project causes an error:
Module build failed: UnhandledSchemeError: Reading from "node:crypto" is not handled by plugins (Unhandled scheme).
Steps to reproduce
Create a NextJs app and instantiate the Surreal database within the
page.tsx
.Expected behaviour
I expect it to instantiate the database so that I can use in-memory one, on the browser.
I expect to be able to create a new user and query that user back.
SurrealDB version
surrealdb wasm 0.8.0 ubuntu 22.04.3 LST
Contact Details
No response
Is there an existing issue for this?
Code of Conduct
The text was updated successfully, but these errors were encountered: