coral-xyz / anchor

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

Error: yarn install failed: program not found #2093

Open shaokun11 opened 2 years ago

shaokun11 commented 2 years ago

as show as below pic, the yarn is installed by run npm i -g corepack and it work, but run anchor init xxxx it still report this error `PS D:\solana-study> yarn -v 1.22.19 PS D:\solana-study> anchor init hello-world
Error: yarn install failed: program not found
PS D:\solana-study> anchor --version
anchor-cli 0.25.0
PS D:\solana-study> solana --version
solana-cli 1.10.31 (src:77a40cd8; feat:4192065167)
PS D:\solana-study> anchor init hello-world2
Error: yarn install failed: program not found
PS D:\solana-study> yarn -v
1.22.19

env is window11

https://ipfs.io/ipfs/QmdkLux9U82K6voQaN4mFY4PfPVvEnXzuNy3Zuq87EvLNi

SkyYap commented 2 years ago

Hi, I can't really view the IPFS file as I didn't install yet. My env is window 11 and face this issue too.

But I think it is a negligible issue. The file still initialized successfully although it mentioned Error: yarn install failed: program not found

Vilayat-Ali commented 2 years ago

@SkyYap are you able to run scripts like anchor run test ? I am not able to run the scripts. However on running tests, I get this Error - /mnt/host/c/Users/{user}/AppData/Roaming/npm/yarn: exec: line 11: node: Permission denied

SkyYap commented 2 years ago

@SkyYap are you able to run scripts like anchor run test ? I am not able to run the scripts. However on running tests, I get this Error - /mnt/host/c/Users/{user}/AppData/Roaming/npm/yarn: exec: line 11: node: Permission denied

I think it's better you open a new issues and shows your code there as it shows line 11 is having an issue.

kevin5544 commented 2 years ago

Good evening, have you been able to solve the error? @shaokun11