-
Notifications
You must be signed in to change notification settings - Fork 6
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 version issue #47
Comments
Thanks for mentioning this! I ran into this recently, and was able to fix it by creating a branch of cargo-leptos that uses 0.2.95 bindgen -- https://github.com/ogghead/cargo-leptos has the branch. I will look into upstreaming this today |
Actually, it looks like someone else beat me to it 😄 so the version on their GitHub should work for you (I suspect). Can you try installing it with |
TLDR: Worked. Thank you!(but not closing issue; see bottom) Long version:It was a bit of a wild ride and I admit deep unfamiliarity with Rust and a bit of uncertainty why it appeared to run full recompilation multiple times. I started with a clean template: Then I issued the suggested command ( After that finished, I ran On the third pass, there were a ton of duplicate errors and the "look out, wasi going away" warning: In the end, it finished, started serving, and was saving button clicks to the SQLite DB. I do not understand why the issuance of Not closing issueI am not marking this issue as closed because the method to get things working did not match the Readme. For whatever reason, when I followed the readme steps, I was building on v0.2.93. Perhaps the template requires further updating? Perhaps there is something with Spin? Perhaps there is dark magic at work. Regardless, something needs updating, even if that thing is only the readme adding a line to do the cargo command provided by @ogghead . |
Glad to hear that worked! On the observation of multiple compilation cycles, I suspect this is caused because the command Spin runs to build your Leptos component is Agreed that updating the README to list the command to install cargo-leptos from GitHub would be ideal -- is that something you might be interested in creating a PR for? |
I apologize for being a bit of a surface-level Rust user. I am unsure what tweaks to make to get this building so I can start playing with Leptos SSR on Fermyon Spin. Please advise.
Platform
Steps taken
I simply followed the readme.
spin templates install --git https://github.com/fermyon/leptos-spin
cargo install cargo-leptos
spin new -t leptos-ssr my-leptos-app -a
cd my-leptos-app
spin build --up
Result
Build command failed due to version-mismatch on wasm-bindgen. Full details in pic.
Fix Option-1 Fails
When trying to update the wasm-bindgen dependency with
cargo update -p wasm-bindgen --precise 0.2.93
, it resulted in:Fix Option-2 Fails
First, I did a clean walk-through of the "steps taken" section to ensure it was a clean attempt at the second option. When attempting to resolve via updating the binary with
cargo install -f wasm-bindgen-cli --version 0.2.95
, it appeared to update some stuff (pic).However,
spin up --build
led to the same version error as before, shown in the "result" section's image.The text was updated successfully, but these errors were encountered: