0

To install some packages globally we can
npm install -g package1 package2
But, now i recently uploaded 2nd app on server and have to install all the packages in package.json but some of them are install previously for 1st app so to save the space on server, I want to save packages globally, so apps can access them and I do not have to install them twice.
My package.json is to large it is hard to install by npm install -g package1 package2 ... this method.

Is there any other method to install all packages in package.json globally?

I have searched but every time i got npm install -g package1 package2

2 Answers 2

1

You can save all the node_modules in a single folder and make this folder accessible from every path inside your server based on your OS. You can also refer custome-location

Sign up to request clarification or add additional context in comments.

Comments

0

Unfortunately this is not possible and it is unlikely to be possible ever in the future.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.