Skip to content

Error when running "cargo leptos watch" #4021

Answered by Liamolucko
kaliban2056 asked this question in Q&A
Discussion options

You must be logged in to vote

This is an unfortunate consequence of the way Leptos handles wasm-bindgen versions.

The first command doesn't work because Leptos' starter template sets wasm-bindgen = "=0.2.92", and cargo update can't update pinned versions.

The second command doesn't work because cargo leptos doesn't actually use wasm-bindgen-cli: it bakes in a specific version of wasm-bindgen-cli-support.

Installing the latest version of cargo-leptos should fix this, since it uses wasm-bindgen 0.2.92 the same as the template.

See also #3900.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by daxpedda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
3 participants
Converted from issue

This discussion was converted from issue #3955 on July 29, 2024 07:23.