-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
The global store should always be on the same disk on which installation is done #712
Comments
in my case MacOS (X), i'll try it out on Ubuntu later (might work, not sure)
|
Seems like this package can help us implement this https://www.npmjs.com/package/drivelist |
@zkochan how do you think that check would work? Checking against only physical drives? I think the issue is reproducible on logical drives as well... |
Yes. You are right. This seems easy to fix on Windows.
I am not so sure how to distinguish different partitions/disks on Linux and
MacOS
…On Mon, Apr 24, 2017, 13:37 Plamen Stoev ***@***.***> wrote:
@zkochan <https://github.com/zkochan> how do you think that check would
work? Checking against only physical drives? I think the issue is
reproducible on logical drives as well...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#712 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB1pm3VYFBBQcCucslKzVAbuL0Q2c73Zks5rzHuAgaJpZM4NEsZs>
.
|
@noformnocontent could you please check on your environment whether path.parse correctly detects the |
tried on Ubuntu, ERROR EXDEV: cross-device link not permitted,
link '/home/dym/.pnpm-store/1/registry.npmjs.org/morgan/1.8.1/HISTORY.md' ->
'/media/dym/Data/work/site/node_modules/.registry.npmjs.org/morgan/1.8.1/node_modules/morgan+stage/HISTORY.md' path.parse: > path.parse('/media/dym/Data/work/site/package.json')
{ root: '/',
dir: '/media/dym/Data/work/site',
base: 'package.json',
ext: '.json',
name: 'package' } |
thanks, I hoped it would return |
pattern is what happens if you run pnpm in a Docker/Kubernetes enviroment -- should be no problem, right? |
I guess if it has one filesystem then it should be fine |
OK, so on Windows it will be on Linux on OSX Seems easy. |
what if I do
on Linux, with /somedir defined in /etc/fstab? What about
? On Linux, any directory might be on a different disk! Not everyone uses Ubuntu and its way of handling some things... |
@zkochan wouldn't it be enough if we "extract" (e.g. |
Here is a way to get the filesystems on Linux: https://www.cyberciti.biz/faq/linux-command-list-mounted-devices-in-terminal/ tl;dr: read the file |
@minecrawler that's only for linux. |
@pstoev yeah, true, but you cannot parse a path on linux in order to get the mount point. Any directory could be located on any disk and partition. There is no way to tell just by looking at the path, as is the case for Windows (I don't know about macOS, however it is *NIX at heart, so it might have the same problem) |
We should also come up with a way to configure the path to the store on file systems. I think we can use a similar format to the one that is used for storing registries and auth info. store = D:\data\pnpm-store
D:\subdir:store = D:\subdir\foo\pnpm-store
D:\:store = D:\store |
Actually, does fixing that issue means that it will be allowed cross-device linking? If yes, ping me, because don't want to work and store on same device ;d I just have totally separated partition for caches, backups and such things. |
No. Cross device linking using hard links is impossible. The store will be
always on the device on which you run install
…On Sat, Apr 29, 2017, 00:32 Charlike Mike Reagent ***@***.***> wrote:
Actually, does fixing that issue means that it will be allowed
cross-device linking? If yes, ping me, because don't want to work and store
on same device ;d I just have totally separated partition for caches,
backups and such things.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#712 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AB1pm7jdBl1wEjCtscr1RL4xzHhNt8uNks5r0lrQgaJpZM4NEsZs>
.
|
@zkochan that's very sad ;/ One more thing why won't use it. Maybe one day when I dont have separate partitions, but.. It's not the only problem. More important kinda problem for me is that non-flat tree, because it messes with my planned package development workflow. Yea, otherwise, it is awesome and super fast exactly because the hardlinks and non-flat architecture. I just kinda like the trick that i found using flat mode. Let me explain the plan, it's a bit offtopic, but shows the cases/scenario why some like me won't use it at el.
So, hope that clear the situation a bit. |
I don't understand what is the issue. It will still use not more space per partition than npm or yarn. Also I don't see in your workflow where you leverage the flattened node_modules structure. It seems you just use global packages |
Atom Editor's ESLint resolves eslintrc which in turn will try to resolve
No. Almost never, just have rollup, mocha (hence, didn't write mocha for years ;d) and standard just for my fast fingers.
yea, in any way, in my case it won't be so much, and so i can reconsider using Pnpm one day when i'm tired of yarn. In any way, keep doing the good job! 🎉 |
Should we rename "global store" to something else to reflect that it is per filesystem/partition? Maybe "partition store", or "disk store"... any ideas? |
For Linux, maybe this? https://www.cyberciti.biz/faq/linux-unix-command-findout-on-which-partition-file-directory-exits/ I don't know how |
Well yarn does not use hard links pointing outside of the node_modules folder, so they don't have this issue |
@Meeeeow Don't use commands/3rd party programs from within your source code. You never know if they exist (even though the GNU utils are popular, there are other options available!). Read the source of truth yourself ( |
I suggest a quick fix before the smart, harder one. If there is a " |
A temporary fix published with v0.69.0-beta.3. It can be installed via The fix is: if linking from store fails, the package is copied. Tested on Linux, let me know if there are issues on other systems |
As this does not seem to be fixable quickly, the "fix" should be added and explained in the first page. Quite a lot of dev. already gave up and it's a pity! |
Mentioned these issues in the README |
Published in v1.15.0. Each disk has a dedicated store now. |
Admittedly I haven't fully read each comment on this issue, but "Each disk has a dedicated store now." doesn't seem to be the case with TC drives mounted on Linux. I've just installed pnpm and haven't configured a store. The README states
I have some packages on a TC drive mounted at Presumably can't tell that the I tried as a workaround to set |
@dandv the second time, if you specified store to be on the same disk, you did not get the |
Thanks @zkochan. indeed, I didn't get any warnings the second time. As an experiment, I installed the dependencies from the same
|
pnpm version:
0.64.8
Code to reproduce the issue:
Run
pnpm install
no a secondary disk (lets say it is diskD
), not the one on which your system lives.Expected behavior:
Installation is successful and a store on disk
D
is created/usedActual behavior:
A store on disk
C
is used and pnpm fails because hardlinks cannot be cross-disk.Additional information:
node -v
prints: anyTemporary fix
If you want to do installations on a different disk till this is not fixed, just change the location of your global store to a directory on the disk you wanna use.
The text was updated successfully, but these errors were encountered: