Version in repo directory path to make way for symlinks to global scope #15423

0x42h opened this Issue Jan 7, 2017 · 2 comments


None yet

2 participants

0x42h commented Jan 7, 2017 edited

What's the feature?

Symlinks for /node_modules to global node_modules.

What problem is the feature intended to solve?

Prevent them for eating unnecessary disk space.

Is the absence of this feature blocking you or your team? If so, how?

No, because I have made a hack to make this work, albeit you have to watch out with the versions, of course.

Is this feature similar to an existing feature in another tool?

Well, preventing redundancy in libraries for development projects, is nothing new, I suppose, so I guess the correct answer to that would be no.

Is this a feature you're prepared to implement, with support from the npm CLI team?

Yeah, sure. Why not. Only thing is, though. I suggest we change the way node installs dependencies, using versioning in the path to the libraries node_modules/{library}/{version}/*, unless somebody has a better idea, of course. Seems pretty reasonable to include the version in the path, I suppose. We could also do things like ln -s latest {version}. Albeit symlinks are not always readily available on Windows, of course. NTFS supports interix-type symlinks, but FAT32 doesn't have any native support for symlinks. Maybe as traditional as FAT32 is, a traditional LNK-file implementation would suffice? Just spraying some implementation ideas.

The current node module system has a tendency of using up a lot of disk space with all the constant re-installation of the same modules. I do not consider this feature request to be trivial when dealing with a lot of different projects. I highly appreciate the hack I currently use.


This has been suggested multiple times, but the nodejs require algorithm makes it not work very well sometimes.

0x42h commented Jan 10, 2017

Could you point me out to that conversation? I'd be interested to understand why that would be so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment