-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Support for Yarn global #8
Comments
This comment may help yarnpkg/yarn#2049 (comment) |
Looking at I can PR immediately if get a bit clarification. |
Hey @jonschlinkert, @doowb help? |
I don't know a lot about how yarn does global caching (I haven't used it in a long time), but as I recall packages aren't installed globally the same way as npm. Doesn't yarn add global packages to sub-directories that are named with hashes (or something similar) to guarantee deterministic installs? If so, how would the global yarn folder even be useful? Would you be able to find the packages you need without globbing or recursing over all the folders? (I might be totally wrong and missing the point. Like I said I haven't used it in a while. Sorry if I'm overcomplicating it) |
Heya. Progress here.
Actually no. It has
{
"systemParams": "linux-x64-64",
"modulesFolders": [
"node_modules"
],
"flags": [],
"linkedModules": [
"charlike-cli"
],
"topLevelPatterns": [
"bithound@^1.7.0",
"bolt@^0.20.6",
"charlike-cli@^0.3.6",
"gitclone-cli@^1.0.1",
"gtop@^0.1.5",
"staticland@^3.2.2",
"verb-generate-readme@^0.6.0",
"verb@verbose/verb#dev",
"vmd@^1.33.0"
],
"lockfileEntries": {
"@types/node@^8.0.24": "https://registry.yarnpkg.com/@types/node/-/node-8.0.46.tgz#6e1766b2d0ed06631d5b5f87bb8e72c8dbb6888e",
"JSONStream@^1.3.2": "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea",
"abbrev@1": "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8",
"abbrev@~1.1.1": "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8",
"agent-base@4": "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.0.tgz#9838b5c3392b962bad031e6a4c5e1024abec45ce",
"agent-base@^4.1.0": "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.0.tgz#9838b5c3392b962bad031e6a4c5e1024abec45ce",
"agentkeepalive@^3.3.0": "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.4.1.tgz#aa95aebc3a749bca5ed53e3880a09f5235b48f0c"
}
} I don't think we need the cache or offline storage, so according to the linked comment above it would be easy change. |
edit: actually no, because we cant treat it as prefix, so should be handled here. We should detect if there is yarn first and then continue? Or even more better would be to just export a function and allow passing options like The only way that i can see this fixed is calling yarn directly to get the paths, but that may be not wanted weight? BUt in same time, it be only behind options, so no breaking changes and no problems for users. And for the Yarn case it should be compromise.
Neither of them are configured specifically. Yarn was just installed through npm. edit 2: Another fix would be to open PR/issue in Yarn to set env variables through the postinstall step, such as i was added in my zsh |
Cool! Didn't noticed them. I should wrap the things around |
Hey there. Just found that it not works for yarn global path.
Which i believe isn't configurable or?
If that's right, then it is
/home/<username>/.config/yarn/global/node_modules
The text was updated successfully, but these errors were encountered: