Closed dominikwilkowski closed 2 months ago
I can't reproduce this issue with the latest version of cargo-leptos
: it is likely you need to update it. wasm-bindgen-cli
needs to update on every patch release, so we often need to combine an update to cargo-leptos
with an update to the wasm-bindgen
version.
Ping me if updating doesn't fix the issue.
Can confirm that after installing the latest cargo-leptos
the problem went away (though I had to blow up the newly created folder and re-create it).
Thank you
λ cargo leptos -V
cargo-leptos 0.2.17
λ cargo install cargo-leptos
[...]
λ cargo leptos -V
cargo-leptos 0.2.19
having same issue
$ cargo leptos -V
cargo-leptos 0.2.20
Actually not the same but rather this part:
λ cargo leptos watch
Compiling [..]
Compiling server_fn v0.6.14
error[E0599]: no method named `set_headers` found for struct `RequestInit` in the current scope
--> /Users/dominik/.cargo/registry/src/index.crates.io-6f17d22bba15001f/server_fn-0.6.14/src/request/browser.rs:196:10
|
196 | init.set_headers(&headers);
| ^^^^^^^^^^^
|
help: there is a method `headers` with a similar name
|
196 | init.headers(&headers);
| ~~~~~~~
error[E0599]: no method named `set_method` found for struct `RequestInit` in the current scope
--> /Users/dominik/.cargo/registry/src/index.crates.io-6f17d22bba15001f/server_fn-0.6.14/src/request/browser.rs:197:10
|
197 | init.set_method("POST");
| ^^^^^^^^^^
|
help: there is a method `method` with a similar name
|
197 | init.method("POST");
| ~~~~~~
error[E0599]: no method named `set_body` found for struct `RequestInit` in the current scope
--> /Users/dominik/.cargo/registry/src/index.crates.io-6f17d22bba15001f/server_fn-0.6.14/src/request/browser.rs:198:10
|
198 | init.set_body(&stream);
| ^^^^^^^^
|
help: there is a method `body` with a similar name
|
198 | init.body(&stream);
| ~~~~
For more information about this error, try `rustc --explain E0599`.
error: could not compile `server_fn` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
Notify watching paths public, src, style
^C Leptos ctrl-c received
If I install a completely fresh folder via
cargo leptos new --git leptos-rs/start-axum
I get an error for thewasm-bindgen = "=0.2.93"
dependency:If I then downgrade that dependency I get a bunch of different errors:
I'm on latest nightly on latest macos on M1 arm64.