-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yarn PnP cache folder resolution failed on Windows #3131
Comments
This problem is caused by Windows not supporting relative paths between drives. Yarn avoids this with a hack where they pretend that relative paths between drives are allowed, while esbuild doesn't do this. A workaround is to make sure everything in the build is on the same drive when using esbuild. |
I moved Yarn cache to D: drive and it is still the same error. Just "D:\D:\...". Looks like path concatenation routine does not respect drive-letter rooted paths, bluntly contatenating them or so. |
Can you provide a way to reproduce the issue? Specific instructions to follow or a repository with sample code would work. |
I'm not sure whether this is the same with the original issue, here is my steps.
|
I had the same problem and I modified it by adding "enableGlobalCache: false" in ".yarnrc" file. |
Ironically, global cache was the main reason to enable Yarn PnP to avoid
refetching of node-modules.
Turning it off is in fact just renaming node-modules folder to .yarn
…On Wed, 6 Mar 2024, 04:58 Niloofar Maleki, ***@***.***> wrote:
I had the same problem and I modified it by adding "enableGlobalCache:
false" in ".yarnrc" file.
you should attention you should have type="module" in the package.json file
—
Reply to this email directly, view it on GitHub
<#3131 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAVDQIKGHCV7RYEXOASBOE3YWYITFAVCNFSM6AAAAAAYM2L5AWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZZGQ2DCMBTGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
You just saved me. Thanks! |
Hi,
I'm trying to active PnP mode for Yarn, but Esbuild (0.17.19) fails to resolve node modules. Windows OS.
Here is the log snippet, demonstrating the issue:
Last two lines show, that Esbuild failed to properly calculate the Yarn cache path (Failed to resolve "D:\C:\)
If I move Yarn cache to drive D:, error looks similar Failed to resolve "D:\D:\
The text was updated successfully, but these errors were encountered: