Skip to content
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

How to solve the error that "Error: TypeError: WebAssembly.instantiate(): Import #0 module="wasi_snapshot_preview1": module is not an object or function" #1505

Open
shaodian2024 opened this issue Dec 14, 2024 · 1 comment

Comments

@shaodian2024
Copy link

shaodian2024 commented Dec 14, 2024

Although I apply the emscripten generated glue code, the error remains. How should I fix the error?

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div>hello4</div>
</body>
    <script src="./RtreeRepo.js"></script>
    <script type="module" src="/index.js"></script>

</html>

the RtreeRepo.js is the generated glue code, while the index.js apply RtreeRepo.wasm

@sbc100
Copy link
Collaborator

sbc100 commented Dec 14, 2024

Are you trying to load RtreeRepo.wasm yourself? That is not necessary. RtreeRepo.js takes care of loading that wasm module for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants