leptos-rs/start-axum-workspace

Fresh project fails to build because of unsuported tokio flags in wasm

cidit opened this issue · 5 comments

Describe the bug
i just created the project yesterday. cargo leptos watch fails in the build step because of the following error:
image

Leptos Dependencies

Please copy and paste the Leptos dependencies and features from your Cargo.toml.

For example:

[workspace.dependencies]
leptos = { version = "0.6", features = ["nightly"] }
leptos_meta = { version = "0.6", features = ["nightly"] }
leptos_router = { version = "0.6", features = ["nightly"] }
leptos_axum = { version = "0.6" }

axum = "0.7"
cfg-if = "1"
console_error_panic_hook = "0.1.7"
console_log = "1"
http = "1"
log = "0.4.20"
simple_logger = "4.2.0"
thiserror = "1"
tokio = { version = "1.33.0", features = ["full"] }
tower = { version = "0.4.13", features = ["full"] }
tower-http = { version = "0.5", features = ["full"] }
wasm-bindgen = "=0.2.92"

To Reproduce
Steps to reproduce the behavior:

  1. create a new project using the following command cargo leptos new -n somename -g "https://github.com/leptos-rs/start-axum-workspace"
  2. accept the nightly features
  3. run cargo leptos watch

Expected behavior
The expected cargo leptos watch behavior.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
now im no tokio expert, but im pretty sure the features = ["full"] part of the tokio dependency is the problem...

gbj commented

Running the provided commands does not reproduce the given error.

cargo leptos new -n somename -g "https://github.com/leptos-rs/start-axum-workspace"
cd somename
cargo leptos watch

Am I misunderstanding something?

Am I misunderstanding something?

i re-created a project today and it works...

the old project still gives me the error though. heres a repo with it in it: https://github.com/cidit/conconway

gbj commented

The repo you linked to contains only a README.

whoopsie daisy, here you go

gbj commented

You probably only want to activate the axum feature on leptos-use in your ssr feature.

https://github.com/cidit/conconway/blob/c8e1064e6e806be04fd36a7b262861e06340a278/app/Cargo.toml#L14C1-L14C73