quickjs-emscripten
quickjs-emscripten copied to clipboard
Errors occurred when using the quickjs-emscripten package normally as follows code
Testing code as below:
,and the error tips:
What possible reasons could cause this?
Your bundler transpiled import.meta.url to import_meta.url, and this property isn't a valid URL. This property is supposed to give a URL (like file:// or http://) to the current file so that we can locate the WASM file adjacent to the Javascript file. The bundler should "do the right thing" when it injects import_meta but it may not actually define import_meta.url.
I recommend setting a breakpoint at that expression, and then logging import_meta.url. If this is undefined, you need to configure your bundler to fill it. If it's an invalid URL, you'll need to debug why in your bundler configuration