Skip to content
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

Panic: called Result::unwrap() on an Err value: Could not remove base #199

Closed
MikMuellerDev opened this issue Oct 6, 2023 · 2 comments
Closed

Comments

@MikMuellerDev
Copy link

Bug Description

After I've installed the newest version of cargo-leptos (0.1.11),
I tried to watch the starter project using cargo leptos watch

Leptos Dependencies

[dependencies]
actix-files = { version = "0.6", optional = true }
actix-web = { version = "4", optional = true, features = ["macros"] }
console_error_panic_hook = "0.1"
cfg-if = "1"
http = { version = "0.2", optional = true }
leptos = { version = "0.5", features = ["nightly"] }
leptos_meta = { version = "0.5", features = ["nightly"] }
leptos_actix = { version = "0.5", optional = true }
leptos_router = { version = "0.5", features = ["nightly"] }
wasm-bindgen = "=0.2.87"

To Reproduce

Steps to reproduce the behavior:

  1. cargo install cargo-leptos
  2. cargo leptos new --git https://github.com/leptos-rs/start
  3. cargo leptos watch
  4. The error appears

Expected behavior**

Ideally, the command should not fail and watch the project files

Full Error

Output of cargo leptos watch

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Could not remove base "/home/mik/Coding/hpi/meme-voting" from "/home/mik/.cache/cargo"', /home/mik/.local/share/cargo/registry/src/index.crates.io-6f17d22bba15001f/cargo-leptos-0.1.11/src/ext/cargo.rs:75:14
stack backtrace:
   0: rust_begin_unwind
             at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panicking.rs:593:5
   1: core::panicking::panic_fmt
             at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/panicking.rs:67:14
   2: core::result::unwrap_failed
             at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/result.rs:1651:5
   3: <cargo_metadata::Metadata as cargo_leptos::ext::cargo::MetadataExt>::rel_target_dir
   4: cargo_leptos::config::lib_package::LibPackage::resolve
   5: cargo_leptos::config::project::Project::resolve
   6: cargo_leptos::config::Config::load
   7: cargo_leptos::run::{{closure}}
   8: tokio::runtime::park::CachedParkThread::block_on
   9: tokio::runtime::context::runtime::enter_runtime
  10: tokio::runtime::runtime::Runtime::block_on
  11: cargo_leptos::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@gbj gbj transferred this issue from leptos-rs/leptos Oct 6, 2023
@gbj
Copy link
Contributor

gbj commented Oct 6, 2023

This looks like a duplicate of #157. Could you confirm if the latest git version of cargo-leptos fixes this?

cargo install cargo-leptos --git=https://github.com/leptos-rs/cargo-leptos

@MikMuellerDev
Copy link
Author

Thank you, your fix resolved the issue.
Just make sure to release a fixed version of the tool on crates.io.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants