You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Microsoft provides a Dev Drive feature in Windows, and they recommend storing package cache, source code, and other content in this drive.
I couldn't find the place to set up the global cache folder, so I used symbolic links to move Yarn's cache folder to this partition.
This usually works well, but when I use the yarn dlx command, it creates a temporary project in the% TEMP% folder and then fails due to cross partition linking, like this:
[Error: EXDEV: cross-device link not permitted, link 'C:\Users\<UserName>\AppData\Local\Yarn\Berry\index\bb\*.dat' -> 'C:\Users\<UserName>\AppData\Local\Temp\xfs-5633e527\dlx-15420\node_modules\.store\*\package\LICENSE']
To reproduce
Move Yarn's global cache folder to another partition.
Create a symbolic link pointing to a new global cache folder location.
Using the yarn dlx command.
Environment
System:
OS: Windows 11 10.0.26120
CPU: (8) x64 AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx
Binaries:
Node: 20.11.1 - C:\Users\<UserName>\AppData\Local\Temp\xfs-6fb8e9e9\node.CMD
Yarn: 4.1.1 - C:\Users\<UserName>\AppData\Local\Temp\xfs-6fb8e9e9\yarn.CMD
npm: 10.2.4 - D:\Program Files\nodejs\npm.CMD
---
# I noticed that the path recognized by envinfo seems to be inaccurate. Here is the actual entry file when I execute the command.
PS>@('node','yarn','npm')|%{gcm $_}
CommandType Name Version Source
----------- ---- ------- ------
Application node.exe 20.11.1.0 D:\Program Files\nodejs\node.exe
ExternalScript yarn.ps1 D:\Program Files\nodejs\yarn.ps1
Application npm.cmd 0.0.0.0 D:\Program Files\nodejs\npm.cmd
Additional context
yarn dlx -q envinfo --preset jest
➤ YN0001: │ Error: EXDEV: cross-device link not permitted, link 'C:\Users\<UserName>\AppData\Local\Yarn\Berry\index\bc\bc5e9c3195095194973fd9732cedd94d4aad5a6d.dat' -> 'C:\Users\<UserName>\AppData\Local\Temp\xfs-16c48bd1\dlx-18596\node_modules\.store\envinfo-npm-7.14.0-624fecc5a5\package\LICENSE'
➤ YN0000: · Failed with errors in 1s 291ms
node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^
[Error: EXDEV: cross-device link not permitted, link 'C:\Users\<UserName>\AppData\Local\Yarn\Berry\index\bc\bc5e9c3195095194973fd9732cedd94d4aad5a6d.dat' -> 'C:\Users\<UserName>\AppData\Local\Temp\xfs-16c48bd1\dlx-18596\node_modules\.store\envinfo-npm-7.14.0-624fecc5a5\package\LICENSE'] {
errno: -4037,
code: 'EXDEV',
syscall: 'link',
path: 'C:\\Users\\Shimakaze\\AppData\\Local\\Yarn\\Berry\\index\\bc\\bc5e9c3195095194973fd9732cedd94d4aad5a6d.dat',
dest: 'C:\\Users\\SHIMAK~1\\AppData\\Local\\Temp\\xfs-16c48bd1\\dlx-18596\\node_modules\\.store\\envinfo-npm-7.14.0-624fecc5a5\\package\\LICENSE'
}
Node.js v20.11.1
The text was updated successfully, but these errors were encountered:
Looks like you have globally set nodeLinker: pnpm? If so this is one of the limitations of the pnpm linker: your globalFolder and the project (in this case, the temporary folder) must be on the same drive because the pnpm linker needs to create hardlinks between those.
Self-service
Describe the bug
Microsoft provides a Dev Drive feature in Windows, and they recommend storing package cache, source code, and other content in this drive.
I couldn't find the place to set up the global cache folder, so I used symbolic links to move Yarn's cache folder to this partition.
This usually works well, but when I use the yarn dlx command, it creates a temporary project in the% TEMP% folder and then fails due to cross partition linking, like this:
To reproduce
Move Yarn's global cache folder to another partition.
Create a symbolic link pointing to a new global cache folder location.
Using the yarn dlx command.
Environment
Additional context
yarn dlx -q envinfo --preset jest
The text was updated successfully, but these errors were encountered: