coral-xyz / anchor

⚓ Solana Sealevel Framework
https://anchor-lang.com
Apache License 2.0
3.36k stars 1.25k forks source link

failed to read package metadata on Windows if the project is on different drive location #2973

Closed Rizary closed 1 month ago

Rizary commented 1 month ago

I have set my $HOME variable to be C:\Users\rizary and the project location is in D:\ as you can see in the picture below. The error seems that it's incorrectly detect the location

image

acheroncrypto commented 1 month ago

As the logs suggest, this seems to be related to cargo-build-sbf (coming from Solana installation) that anchor build uses under the hood.

This is also very likely to be a Windows only issue as Windows uses different file path separator. There is not much we can do to fix this on our side, and even if this gets fixed, there are a lot more probles that people run into while using Windows.

The most common solution is to use WSL instead.

acheroncrypto commented 1 month ago

Also, I've just realized you use space in your file path \school of solana\, that might also be the reason for the error.

Rizary commented 1 month ago

Thanks for the answer.. the space is not an issue (i've changed it and the error persist). I'll try to open issue on cargo-build-sbf