anchor icon indicating copy to clipboard operation
anchor copied to clipboard

Error: yarn install failed: program not found

Open shaokun11 opened this issue 2 years ago • 4 comments

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

shaokun11 avatar Jul 31 '22 09:07 shaokun11

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

SkyYap avatar Aug 01 '22 13:08 SkyYap

@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

Vilayat-Ali avatar Oct 07 '22 12:10 Vilayat-Ali

@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.

SkyYap avatar Oct 08 '22 17:10 SkyYap

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

kevin5544 avatar Nov 05 '22 03:11 kevin5544