Skip to content
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

[Bug] Invalid path to the global cache folder #642

Closed
zdm opened this issue Dec 17, 2019 · 6 comments
Closed

[Bug] Invalid path to the global cache folder #642

zdm opened this issue Dec 17, 2019 · 6 comments
Labels
bug Something isn't working

Comments

@zdm
Copy link

zdm commented Dec 17, 2019

Describe the bug
I am using following settings in my .yarntc.yml:

globalFolder: d:/devel/.yarn
enableGlobalCache: true

I installed dependencies with yarn, everything is ok. Then I am trying to lint the project:

yarn eslint src

Error: Couldn't find a suitable Node resolution for the specified unqualified path

Source path: /d:/gdrive/projects/devel/.yarn/cache/eslint-npm-6.7.2-932e9e7a3c-1.zip/node_modules/eslint/bin/eslint.js
Rejected resolution: /d:/gdrive/projects/devel/.yarn/cache/eslint-npm-6.7.2-932e9e7a3....

You can see. that path to the cache is invalid. According to my settings it shoud be:

/d:/devel/.yarn/cache/eslint-npm-6.7.2-932e9e7a3c-1.zip/node_modules/eslint/bin/eslint.js

Environment if relevant (please complete the following information):

  • OS: windows 10
  • Node 13.3.0
  • Yarn 2.0.0-rc19
@zdm zdm added the bug Something isn't working label Dec 17, 2019
@arcanis
Copy link
Member

arcanis commented Dec 17, 2019

Can you try to set /d:/ or d:\ instead of d:/?

@zdm
Copy link
Author

zdm commented Dec 17, 2019 via email

@zdm
Copy link
Author

zdm commented Dec 19, 2019

I think I understood what is the problem. I am using same project directory both under windows and under vmware linux via vmware shared folders. So, when I run yarn under linux it creates .pnp.js, where all links to the packages are for linux file system, and project become unusable under windows.

I think, it will be better to store packageLocation in .pnp.js relative to the current yarn store folder.

@zdm
Copy link
Author

zdm commented Dec 19, 2019

Maybe this is also the root of the problem in the issue #645

@zdm
Copy link
Author

zdm commented Dec 19, 2019

Hmmm, the problem is not in vmare.
Now it creates such links packageLocation": "../../C:/Users/zdm/.yarn/global/cache/wrappy-npm-1.0.2-916de4d4b3-1.zip/node_modules/wrappy/",.
So, the bug is definitely in how it stores paths to the packages in the global store.

@arcanis
Copy link
Member

arcanis commented Jan 17, 2020

I'm almost positive this bug as been fixed (it was related to an invalid __filename usage), so I'm going to close the issue. Please reopen a new one if things still look fishy!

@arcanis arcanis closed this as completed Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants