surrealdb / surrealdb.wasm

A WebAssembly engine for the SurrealDB JavaScript SDK
https://surrealdb.com
Apache License 2.0
112 stars 17 forks source link

Bug: Unable to run the Development Server (index.html) of the v1.0.0-beta.9 #77

Closed limcheekin closed 2 months ago

limcheekin commented 4 months ago

Describe the bug

After the development server started, the browser console reported the following error: Uncaught ReferenceError: surrealdbWasmEngines is not defined.

Initial response from Micha on May 6:

I think that that demo is actually broken at the moment. I used to include the minified version of the js and wasm library, but I realized that that caused for example the RecordID class to be defined in two different spots, which would then in turn break CBOR serialization and deserialization. A best workaround is probably to have a single JS module which imports both libraries, then bundles it all and which gets included by the html file :)

Steps to reproduce

I tried make serve and then access localhost:8000 in the browser, the ./dist/embedded/web.js not found? Then I change the code of index.html file to use ./dist/embedded/index.js, and re-run the make serve.

Expected behaviour

The Development Server should run without issue.

SurrealDB version

1.0.0-beta.9

Contact Details

No response

Is there an existing issue for this?

Code of Conduct