[Solved] How install several --no-save modules

Hello all, i’m currently working on updating a project from a very old version of node (and so npm) to the newer version, however we have a very specific way of handle modules and i can’t manage to make it work.

I’ll try to be clear ;)

We have a package-json and now a package-lock.json with our dependencies, we have a folder with .tgz packages we developped in our team.

We want to install these packages when our node server is launched because the list of package can change depending on installation, and change during production with just the need for the client to re-restart the server.

Like we want to change easily the list of these packages we don’t want to have them in package.json or package-lock.json

To install them we use the node-modules/.bin/npm command, for all reason said before, i’m currently trying to check all .tgz files in the directory and make “npm install --no-save directory/file.tgz” however, at each file it deletes the former one, i think it’s a wanted feature to remove package not present in package.json, but is there a way to disable this when installing a package and just keep this option for a clean “npm install”.

Hope i’ve been clear about my problem, feel free to ask all youre questions and thank you in advance for your help.

Finally solved my problem the --no-save isn’t enough for this case, i had to add the --no-package-lock to disable auto-prune.

If it can help someone ;)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.