Environment: Windows, Node 16.18.0, Corepack 0.14.1
I am following these instructions to install Yarn.
When I run corepack prepare [email protected]
or corepack prepare [email protected] --activate
I get the following error:
Preparing [email protected]... Internal Error: ENOENT: no such file or directory, stat 'C:\Users\rashiditaba\AppData\Local\node\corepack\yarn\3.2.4' Error: ENOENT: no such file or directory, stat 'C:\Users\***\AppData\Local\node\corepack\yarn\3.2.4'
I had the same issue and discovered that the yarn.js file was being downloaded, but not into the expected location.
The yarn.js file was downloaded to a new folder created with the path
C:\Users\***\AppData\Local\node\corepack\corepack-NEW_RANDOM_NAME
I just moved this folder into the yarn directory and renamed it to match the expected pathC:\Users\***\AppData\Local\node\corepack\yarn\4.0.0
Then I reran the
corepack prepare yarn@stable --activate
command and now yarn is reporting that it is version 4.0.0