-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Failed to read Cargo metadata from Cargo.toml file #3885
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
Comments
I think cargo is not on your PATH, can you try running Code from the terminal? There are a couple of older issues for the same error. |
Yeah, I included
I did not try launching VSCode via terminal, yet though. I tried your suggestion of launching VSCode from the terminal, and that seemed to work. Not sure why that works, but Rust Analyzer is working now. Thanks! |
We absolutelly should give a specific "cargo is not in your PATH" error in
this case, it's such a common stumbling block.
…On Wed, 8 Apr 2020 at 19:02, Laurențiu Nicola ***@***.***> wrote:
See #1811 <#1811>,
#2496 <#2496>, #1533
<#1533> or #3118
<#3118>. Code
doesn't read your .profile file, but the integrated terminal does because
it spawns a shell.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3885 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANB3M2DOHHBROANPBLKEMLRLSU3BANCNFSM4MDQZHQQ>
.
|
I agree...It would be very nice to have a specific error message for this. I just set up a new system and must have done it wrong and ran into this issue... A more precise error message would have saved me quite a bit of time / annoyance finding this. |
I think "failed to run |
Uh oh!
There was an error while loading. Please reload this page.
I'm working with
rust-analyzer
on Solus, and I keep getting this error whenever I open my workspace in VSCode:The error kind of sounds like it either can't find the Cargo.toml file at that path, or it's missing manifest information? The Cargo.toml file is definitely at that path. Here's what it looks like:
I'm not sure if it's an issue with my project or not because my Rust workspace project seemed to work fine with Rust Analyzer in my WSL installation. It seems like Rust Analyzer isn't running at all as a result of this.
I followed the installation instructions for the VSCode extension, and clicked the Download Now button when prompt. I also tried the suggestion in that error, and ran
cargo metadata --manifest-path /home/travis/rust/rpg/Cargo.toml
. I got a ton of output in my terminal, but it didn't appear that Rust Analyzer was running. It wouldn't get rid of that error whenever I closed and reopened VSCode either. Finally, I completely uninstalled Rust, and reinstalled it viarustup
.Is there anything that I could be overlooking?
The text was updated successfully, but these errors were encountered: