Uncaught (in promise) TypeError: Failed to resolve module specifier '@jitl/quickjs-wasmfile-release-sync'
at quickJS (@sebastianwessel_quickjs.js?v=1c57c2d9:16913:34)
at run (App.tsx:70:35)
at App.tsx:122:5
at commitHookEffectListMount (react-dom_client.js?v=f9f4815c:16915:34)
at commitPassiveMountOnFiber (react-dom_client.js?v=f9f4815c:18156:19)
at commitPassiveMountEffects_complete (react-dom_client.js?v=f9f4815c:18129:17)
at commitPassiveMountEffects_begin (react-dom_client.js?v=f9f4815c:18119:15)
at commitPassiveMountEffects (react-dom_client.js?v=f9f4815c:18109:11)
at flushPassiveEffectsImpl (react-dom_client.js?v=f9f4815c:19490:11)
at flushPassiveEffects (react-dom_client.js?v=f9f4815c:19447:22)
I use
Vite + React
in locally, But get some error, Unable to run successfully.package.json:
App.tsx:
function App() { async function run() { // const variant = newVariant(RELEASE_SYNC, { // wasmLocation: new URL("/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.wasm", import.meta.url).href, // }); // const module = await newQuickJSWASMModuleFromVariant(Promise.resolve(variant)); // const vm = module.newContext(); // console.log("vm:", vm); const {createRuntime} = await quickJS('@jitl/quickjs-wasmfile-release-sync');
}
useEffect(() => { run(); }, []);
return (
) }
export default App
Uncaught (in promise) TypeError: Failed to resolve module specifier '@jitl/quickjs-wasmfile-release-sync' at quickJS (@sebastianwessel_quickjs.js?v=1c57c2d9:16913:34) at run (App.tsx:70:35) at App.tsx:122:5 at commitHookEffectListMount (react-dom_client.js?v=f9f4815c:16915:34) at commitPassiveMountOnFiber (react-dom_client.js?v=f9f4815c:18156:19) at commitPassiveMountEffects_complete (react-dom_client.js?v=f9f4815c:18129:17) at commitPassiveMountEffects_begin (react-dom_client.js?v=f9f4815c:18119:15) at commitPassiveMountEffects (react-dom_client.js?v=f9f4815c:18109:11) at flushPassiveEffectsImpl (react-dom_client.js?v=f9f4815c:19490:11) at flushPassiveEffects (react-dom_client.js?v=f9f4815c:19447:22)