Grant P
Grant P

Reputation: 85

How to do a manual install of Node js package dependencies

I am rather new to Node but am working on a project behind a very restrictive firewall so I cannot use npm to install packages (no proxy either). I am trying to use express and have been able to include it by just storing the files locally and requiring the local file path but I do not know how to structure the project so that node can find and include all of the dependencies for express (which I also have manually downloaded from github and stored locally within the project). Does anyone know how to do a completely manual global or local install of individual node dependency packages?

Upvotes: 2

Views: 2951

Answers (1)

Iglo
Iglo

Reputation: 706

Simply download the files and place them in a 'node_modules' folder in the root of your app. Then use 'npm init' to create a package.json. Add your dependencies in the dependencies list in that file.

Then run simply 'npm install'.

Upvotes: 2

Related Questions