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

Unable to resolve version issue #3900

Closed
adityakak27 opened this issue Mar 19, 2024 · 5 comments
Closed

Unable to resolve version issue #3900

adityakak27 opened this issue Mar 19, 2024 · 5 comments
Labels

Comments

@adityakak27
Copy link

Summary

I am new to rust, and unable to understand what this means. I have tried updating the package, but every time something fails to install, and causes an error.

Additional Details

Photos of the error are provided below:

image
image

@Liamolucko
Copy link
Collaborator

Updating wasm-bindgen-cli isn't working because cargo leptos doesn't use it, it has wasm-bindgen 0.2.92 baked in.

I'm not aware of any way to change which version it uses (without just cloning their repo and changing the Cargo.toml), so the simplest solution would be to follow the other instruction and update the wasm-bindgen library to 0.2.92 instead.

@wildwestrom
Copy link

I'm encountering the same issue. I followed the instructions but the error persists.

@adityakak27
Copy link
Author

adityakak27 commented Mar 21, 2024

The other instruction is also not working, it shows me the same issue i think, one or more packages fail to install, as the other instruction also updates to 0.2.92, and shows the same error.

@juntuu
Copy link

juntuu commented Mar 21, 2024

I encountered this same issue when using the starter template for Leptos.

Trying the suggestion from the error message:

You should be able to update the wasm-bindgen dependency with:

    cargo update -p wasm-bindgen --precise 0.2.92

gave an error:

error: failed to select a version for the requirement `wasm-bindgen = "=0.2.89"`
candidate versions found which didn't match: 0.2.92

Changing the project's dependency in Cargo.toml fixed the issue for me:

-wasm-bindgen = "=0.2.89"
+wasm-bindgen = "=0.2.92"

The suggested update didn't work, because the Cargo.toml had precise version. But updating the version requirement manually was fine.


I think this is an issue with cargo-leptos specifically as it sets the wasm-bindgen-cli version. I think it could warn about version mismatch with more helpful message.

@adityakak27
Copy link
Author

I encountered this same issue when using the starter template for Leptos.

Trying the suggestion from the error message:

You should be able to update the wasm-bindgen dependency with:

    cargo update -p wasm-bindgen --precise 0.2.92

gave an error:

error: failed to select a version for the requirement `wasm-bindgen = "=0.2.89"`
candidate versions found which didn't match: 0.2.92

Changing the project's dependency in Cargo.toml fixed the issue for me:

-wasm-bindgen = "=0.2.89"
+wasm-bindgen = "=0.2.92"

The suggested update didn't work, because the Cargo.toml had precise version. But updating the version requirement manually was fine.

I think this is an issue with cargo-leptos specifically as it sets the wasm-bindgen-cli version. I think it could warn about version mismatch with more helpful message.

This worked for me! Thank you so much for this, I hope others will also find this solution to be as helpful as I did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants