
Npm install modules globally install#
global packages are all put in a single place in your system (exactly where depends on your setup), regardless of where you run npm install -gThe predominant usage pattern is locally installed modules. Node, unlike many dynamic languages, doesn't put global modules on a lookup path by default. In npm 0.x, there was a command called bundle that a lot of people liked. I don't know your exact use case, but what you're describing is how Node.js's module resolution algorithm works npm has nothing to do with how modules are resolved by Node. I have just reinstalled Ubuntu 12. More than anything else, the driving force behind the npm 1.0 rearchitecture was the desire to simplify what a package installation directory structure looks like. By default, npm install will install all modules listed as dependencies in package.json. In global mode (ie, with -g or -global appended to the command), it installs the current package context (ie, the current working directory) as a global package. Npm 1.0: Global vs Local installation by Isaac Schlueter, Install the dependencies in the local nodemodules folder.
