Error when running "cargo leptos watch" #4021
-
Describe the BugI've just created a leptos project with "cargo leptos new --git https://github.com/leptos-rs/start".
I've executed both the commands to update and install the new version, but when I run again "cargo leptos watch" I get the same output. Steps to Reproduce
Expected BehaviorI should be able to see a website hosted on localhost. Actual BehaviorDoesn't compile and get always the same error. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I'm no expert, but it would definitely help anyone wanting to help you to have more information about your environment. What did you use to set up your Rust environment ( You might also try removing the |
Beta Was this translation helpful? Give feedback.
-
This is an unfortunate consequence of the way Leptos handles wasm-bindgen versions. The first command doesn't work because Leptos' starter template sets The second command doesn't work because Installing the latest version of See also #3900. |
Beta Was this translation helpful? Give feedback.
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"
, andcargo update
can't update pinned versions.The second command doesn't work because
cargo leptos
doesn't actually usewasm-bindgen-cli
: it bakes in a specific version ofwasm-bindgen-cli-support
.Installing the latest version of
cargo-leptos
should fix this, since it useswasm-bindgen
0.2.92 the same as the template.See also #3900.