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 loading wasm-bindgen-minimal example #402

Open
cmontella opened this issue Apr 27, 2020 · 1 comment
Open

Error loading wasm-bindgen-minimal example #402

cmontella opened this issue Apr 27, 2020 · 1 comment

Comments

@cmontella
Copy link

I tried running the wasm-bindgen-minimal example and got this error:

Error loading Rust wasm module 'wasm_bindgen_minimal': TypeError: Import module '__wbindgen_placeholder__' is invalid

0: Import module '__wbindgen_placeholder__' is invalid
wasm-bindgen-minimal.js (46,20)

Compiled on Windows 10
Rust: nightly-2020-04-06-x86_64-pc-windows-msvc
Cargo web: 0.6.26
Browser: Firefox 75.0

@genderev
Copy link

genderev commented Feb 20, 2021

I followed these steps:

cargo install cargo-web

gh repo clone koute/stdweb

cd stdweb

cd examples

cd canvas 

cargo web start --target=wasm32-unknown-unknown

Terminal read warning: 47 warnings emitted - but I still tried to see the final result in the browser.

I got this error in my browser's console for localhost:8000:

canvas.js:631 Encountered a panic!

__cargo_web_snippet_dc2fd915bd92f9e9c6a3bd15174f1414eee3dbaf @ canvas.js:631
canvas.js:583 Panic location: /rustc/e1884a8e3c3e813aada8254edfa120e85bf5ffca/library/core/src/mem/mod.rs:659

I tried the todomvc example and got the same errors in terminal and console. Could not interact with page for the todomvc example, and the canvas example resulted in a blank screen.

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