I have a system that builds several node.js projects and maintains the node_modules cache of each project separately. I'm trying to migrate from npm 3 to npm 5 but the issue below is causing a lot of problems.
node_modules
inside each project is a symbolic link to the real modules directory that is stored and maintained separately. While this worked like charm in npm 3, npm 5 keeps losing itself when npm install
is re-invoked inside the same location. npm just keeps trying to remove/move everything over and over, and worse lose some packages sometimes.
These commands demosntrate the issue:
> cd <proj_folder>
> ln -s $(mktemp -d -p .) node_modules
> npm install grunt
+ grunt@1.0.2
added 92 packages in 6.122s
> npm install grunt
+ grunt@1.0.2
added 251 packages and updated 1 package in 7.584s
Am I missing something? please assist ..
thank you