Synphonyte / leptos-use

Collection of essential Leptos utilities inspired by React-Use / VueUse
https://leptos-use.rs/
Apache License 2.0
334 stars 79 forks source link

web-sys crate missing requirement for leptos-use #169

Closed R2rho closed 2 months ago

R2rho commented 2 months ago

I'm suddenly getting all kinds of build errors in my Leptos app using leptos-use related to web-sys LockMode. I tried cargo clean, deleting my local cache, upgrading web-sys several times but I'm already on the latest 0.3.70. I tried updating wasm-bindgen as well. Am I missing something here or is there a bug in leptos-use?

error[E0432]: unresolved import `web_sys::LockMode`
 --> C:\Users\...\.cargo\registry\src\index.crates.io-6f17d22bba15001f\leptos-use-0.13.1\src\use_web_lock.rs:5:9
  |
5 | pub use web_sys::LockMode;
  |         ^^^^^^^^^^^^^^^^^ no `LockMode` in the root

Steps to reproduce: Create a new rust project and verify it builds

cargo new test-leptos-use
cd test-leptos-use
cargo build

Add leptos-use and try building again:

cargo add leptos-use
cargo build
...

pub use web_sys::LockMode;
  |         ^^^^^^^^^^^^^^^^^ no `LockMode` in the root