dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

Couldn't retrieve cargo metadata

Open suenot opened this issue 1 year ago • 2 comments

Problem dx serve

Error: Couldn't retrieve cargo metadata

Caused by:
    0: failed to start `cargo metadata`: No such file or directory (os error 2)
    1: No such file or directory (os error 2)

ls

Cargo.lock         Cargo.toml         Dioxus.toml        README.md          assets             input.css          src                tailwind.config.js 
target

but cargo metadata worked: image

Steps To Reproduce

Steps to reproduce the behavior:

  • cargo install dioxus-cli
  • dx new
  • create project and cd project
  • dx serve

Expected behavior

run without errors

Environment:

  • Dioxus version: v0.5.6
  • Rust version: 1.80.1 (3f5fd8dd4 2024-08-06)
  • OS info: macOS Sonoma 14.2.1 (23C71) on Apple M1 processor
  • App platform: 'web'
  • cargo 1.80.1 (376290515 2024-07-16)

suenot avatar Aug 12 '24 16:08 suenot

Can you reproduce this issue on the Dioxus v0.6.0 alpha? We recently upgraded our Cargo support with cargo-metadata. My initial guess here is you might be inside another Cargo workspace? :thinking: Otherwise that seems like a fairly standard setup

matthunz avatar Aug 28 '24 21:08 matthunz

In my case i removed .cargo enviromental from windows system enviromentals and it worked. So probably double declared enviromental variable.

asx8678 avatar Nov 12 '24 12:11 asx8678