Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Installing a node module from a gobally installed version

I have an interesting question. let us say that I’m going on a holiday where I don’t have access to the internet. I happen to bring my laptop with me so that I can write some code. Me being an idiot or smart depending on perspective, I usually install my node modules using the global flag. I suspect that this adds the module locally.

My Question.

Is it possible to npm install a module locally installed into a new project without having access to the internet?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

if so, what command does one run?

>Solution :

Yes, it is possible to install a locally-saved npm module into a new project without an internet connection. In order to do this, you will first need to navigate to the directory where the module is saved on your computer. Then, you can use the following command to install the module into your new project:

npm install /path/to/module

Replace /path/to/module with the actual file path to the module on your computer. This will install the module into your new project, allowing you to use it as you would any other npm module.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading