Global Mode

suggest change

With the default Unix prefix, global mode installs packages into /usr/local/lib/node_modules. npm root -g prints the prefix actually in use (it differs under nvm and on Windows). This command downloads the latest express into /usr/local/lib/node_modules/express:

$ npm install -g express

The install needs write access to that folder. Packages installed there are available to every Node process on the machine.

A local install downloads modules into a node_modules folder in the current directory. From /home/user/apps/my_app, npm creates /home/user/apps/my_app/node_modules if it does not already exist.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents