Reputation: 311
I want to learn and use nodejs at work, but there I have network issues while using de npm command to install modules/packages. Is it possible I build, using my home computer, a full package node js, and then install it in another computer (my workplace computer) so i do not need using npm at all? Both computers work using Windows 7 operating system.
Upvotes: 1
Views: 72
Reputation: 36319
Node applications don’t need installation the way you’re thinking of it. So long as you have the same node runtime installed on both computers and all the packages are installed locally (ie without the -g flag), you can just copy the directory the project is in to the new computer and run it there in most cases.
The exceptions will be if your systems are radically different and depend on binaries (eg if you’re using a module like ffmpeg that pulls an OS-appropriate binary down and you’re home and work computers are different OS’s. )
The way around that would be to package using Docker and run in a container on both systems.
That said, I wouldn’t do that. Depending on company policies you might still get in trouble, and it’ll be a lot harder to maintain.
Instead, I’d look at the variety of posts here about getting npm to work behind corporate proxies (you may just be doing it wrong), and in my company it just took persistence with the InfoSec people to prove there was a business need before they made modifications to make it easier to do.
Upvotes: 1