Anderson Green
Anderson Green

Reputation: 31810

Is it possible to change the directory where node.js modules are installed?

Is there any way to change the directory where node.js modules are installed? By default (on Linux Mint 13), npm install express installs the express module in home/username/node_modules, but I want modules to be installed by default in home/username/Dropbox/node_modules instead.

Upvotes: 1

Views: 2106

Answers (1)

Sushant Gupta
Sushant Gupta

Reputation: 9458

Well if you want to change installation directory try setting relevant prefix.

Just a suggestion though, if its a small project, a quick fix is simply install packages separately on each machine. If its a big project then I guess you would be atleast using some source control like git. All package dependencies can be managed elegantly using source control.

Upvotes: 2

Related Questions