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

Error when instantiating wasm file #13

Closed
TristonStuart opened this issue May 23, 2020 · 1 comment
Closed

Error when instantiating wasm file #13

TristonStuart opened this issue May 23, 2020 · 1 comment

Comments

@TristonStuart
Copy link

Error : TypeError: WebAssembly.instantiate(): Import #0 module="a" error: module is not an object or function

Here is the wasm code I think it is referring too : (import "a" "a" (func $import0)) (import "a" "b" (func $import1 (param i32) (result i32))) (import "a" "c" (func $import2 (param i32 i32 i32 i32) (result i32))) (import "a" "d" (func $import3 (result i32))) (import "a" "e" (func $import4 (param i32))) (import "a" "f" (func $import5 (param i32 i32 i32) (result i32)))

Compared to the demo wasm file : (import "env" "b" (func $import0)) (import "env" "c" (func $import1 (param i32))) (import "env" "d" (func $import2 (param i32) (result i32))) (import "asm2wasm" "f64-rem" (func $import3 (param f64 f64) (result f64))) (import "env" "e" (func $import4 (result i32))) (import "env" "f" (func $import5 (param f64) (result f64))) (import "env" "g" (func $import6 (param i32))) (import "env" "h" (func $import7 (param i32))) (import "env" "i" (func $import8 (result i32))) (import "env" "j" (func $import9 (param i32 i32))) (import "env" "k" (func $import10 (param i32 i32) (result i32)))

Just a note I compiled it with the error mentioned in a previous post but it outputs the wasm file before that error.

@TristonStuart
Copy link
Author

This is do the errors when compiling.
Check out this comment: #10 (comment)
It solved all of my errors during compiling and should be a good step to do when encountering weird errors.

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

1 participant