LemmyNet / lemmy-ui-leptos

GNU Affero General Public License v3.0
119 stars 10 forks source link

`cargo install cargo-leptos` fails in dev, cannot run app #146

Open alectrocute opened 1 month ago

alectrocute commented 1 month ago

Hi friends!

I've been daydreaming about contributing to the new UI and finally decided to clone it and get started familiarizing myself with it/the framework today. I'm on macOS 15.0 on an M1 arch.

Running into this issue after attempting to following the instructions in CONTRIBUTING.md:

lemmy-ui-leptos git:(main) ✗ cargo install cargo-leptos

    Updating crates.io index
  Installing cargo-leptos v0.2.20
    Updating crates.io index
error: failed to compile `cargo-leptos v0.2.20`, intermediate artifacts can be found at `/var/folders/3b/s22tvgl57r5fbtnrb7hq84nr0000gn/T/cargo-installEJPfnI`

Caused by:
  failed to select a version for `wasmparser`.
      ... required by package `wasm-bindgen-wasm-conventions v0.2.93`
      ... which satisfies dependency `wasm-bindgen-wasm-conventions = "=0.2.93"` of package `wasm-bindgen-cli-support v0.2.93`
      ... which satisfies dependency `wasm-bindgen-cli-support = "=0.2.93"` of package `cargo-leptos v0.2.20`
  versions that meet the requirements `^0.212` are: 0.212.0

  the package `wasm-bindgen-wasm-conventions` depends on `wasmparser`, with features: `indexmap` but `wasmparser` does not have these features.
   It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.

  failed to select a version for `wasmparser` which could resolve this conflict

Did some googling on the issue and found this but the advice there didn't help.

I'm a Rust newbie so any help appreciated.

dessalines commented 1 month ago

Thx, we'd love any help we could get on this!

What version of rust are you on? I'm fairly sure an updated nightly is needed, so run :

rustup update
rustup default nightly
rustup target add wasm32-unknown-unknown
cargo install cargo-leptos
cargo leptos watch

Most of this is from our woodpecker CI setup.

jim-taylor-business commented 2 weeks ago

yeah