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

wasm-bindgen-cli needs updating #95

Open
PattMayne opened this issue Dec 6, 2024 · 2 comments
Open

wasm-bindgen-cli needs updating #95

PattMayne opened this issue Dec 6, 2024 · 2 comments

Comments

@PattMayne
Copy link
Contributor

The project compiles, but when I run cargo leptos watch I get this error:

Error: at `/home/pattmayne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-leptos-0.2.22/src/compile/front.rs:51:30`

Caused by:
    0: at `/home/pattmayne/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-leptos-0.2.22/src/compile/front.rs:126:10`
    1: 
       
       it looks like the Rust project used to create this Wasm file was linked against
       version of wasm-bindgen that uses a different bindgen format than this binary:
       
         rust Wasm file schema version: 0.2.95
            this binary schema version: 0.2.96
       
       Currently the bindgen format is unstable enough that these two schema versions
       must exactly match. You can accomplish this by either updating this binary or
       the wasm-bindgen dependency in the Rust project.
       
       You should be able to update the wasm-bindgen dependency with:
       
           cargo update -p wasm-bindgen --precise 0.2.96
       
       don't forget to recompile your Wasm file! Alternatively, you can update the
       binary with:
       
           cargo install -f wasm-bindgen-cli --version 0.2.95
       
       if this warning fails to go away though and you're not sure what to do feel free
       to open an issue at https://github.com/rustwasm/wasm-bindgen/issues!

This exact error occurs whether I install wasm-bindgen-cli --version 0.2.95 or wasm-bindgen-cli --version 0.2.96

The only way I can get it to run is if I install 0.2.96 and then change cargo.lock from
wasm-bindgen = "=0.2.95"
to
wasm-bindgen = "=0.2.96"

@Nutomic
Copy link
Owner

Nutomic commented Dec 9, 2024

Unfortunately this error will keep happening every time someone uses a different (newer or older) version of cargo leptos. The closest upstream issue for a permanent solution is leptos-rs/cargo-leptos#399

Edit: Also see leptos-rs/leptos#3186

@PattMayne
Copy link
Contributor Author

I updated leptos to 0.2.24 and wasm-bindgen to 0.2.99

Everything is working now but I'll keep the issue open for others.

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