`Error: spawn cargo ENOENT` after applying the fix when installing in vscode
Opened this issue ยท 12 comments
Problem
when i install the extension in vscode, i get the error prompt telling me to apply as expected.
however, after applying the fix and clicking continue on the popup, i get the following error, and the extension doesnt start.
Logs
OS: linux (6.2.10-200.fc37.x86_64)
VSCode: 1.77.3
Error message
Error: spawn cargo ENOENT
Full log: https://paste.rs/IoQ
oh, actually, after peeking at the logs, i think i see what the problem is. im using an alternative shell.
nope, rustc -Vv
works in my sh
environment and produces the following output:
sh-5.2$ rustc -Vv
rustc 1.68.2 (9eb3afe9e 2023-03-27)
binary: rustc
commit-hash: 9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0
commit-date: 2023-03-27
host: x86_64-unknown-linux-gnu
release: 1.68.2
LLVM version: 15.0.6
im not sure what's going wrong.
Thanks for the report. What is the output of this command?
$(rustup which --toolchain nightly-2023-04-12 rustc) -vV
that would be the following when called in sh
sh-5.2$ $(rustup which --toolchain nightly-2023-04-12 rustc) -vV
rustc 1.70.0-nightly (9df3a39fb 2023-04-11)
binary: rustc
commit-hash: 9df3a39fb30575d808e70800f9fad5362aac57a2
commit-date: 2023-04-11
host: x86_64-unknown-linux-gnu
release: 1.70.0-nightly
LLVM version: 16.0.2
I'm guessing this is an issue where the PATH used by VSCode is not the same as the PATH used by your normal shell. Not sure off-hand why this is happening, but I will take a look into it.
I got the same issue. Not urgent, just sharing in case more info is helpful. I love what you've made here!
Looks like the above command outputs the same for me as it did for cidit:
rustc 1.70.0-nightly (9df3a39fb 2023-04-11)
binary: rustc
commit-hash: 9df3a39fb30575d808e70800f9fad5362aac57a2
commit-date: 2023-04-11
host: x86_64-unknown-linux-gnu
release: 1.70.0-nightly
LLVM version: 16.0.2
Speaking of, @willcrichton did you get the chance to look into it?
Not yet, I will keep y'all posted in this thread once I've located the issue.
For me, following the "build from source" installation process worked. I have an M1 mac. @cidit are you on an M1 mac?
i'll try to build from source tho, seemed like too much trouble at the time but i'll give it another shot.
It was very straightforward. I think it took 5 minutes, max.