1 npm(1) -- javascript package manager
2 ====================================
14 npm is the package manager for the Node JavaScript platform. It puts
15 modules in place so that node can find them, and manages dependency
16 conflicts intelligently.
18 It is extremely configurable to support a wide variety of use cases.
19 Most commonly, it is used to publish, discover, install, and develop node
22 Run `npm help` to get a list of available commands.
26 You probably got npm because you want to install stuff.
28 Use `npm install blerg` to install the latest version of "blerg". Check out
29 `npm-install(1)` for more info. It can do a lot of stuff.
31 Use the `npm search` command to show everything that's available.
32 Use `npm ls` to show everything you've installed.
36 If a package references to another package with a git URL, npm depends
37 on a preinstalled git.
39 If one of the packages npm tries to install is a native node module and
40 requires compiling of C++ Code, npm will use
41 [node-gyp](https://github.com/TooTallNate/node-gyp) for that task.
42 For a Unix system, [node-gyp](https://github.com/TooTallNate/node-gyp)
43 needs Python, make and a buildchain like GCC. On Windows,
44 Python and Microsoft Visual Studio C++ are needed. Python 3 is
45 not supported by [node-gyp](https://github.com/TooTallNate/node-gyp).
46 For more information visit
47 [the node-gyp repository](https://github.com/TooTallNate/node-gyp) and
48 the [node-gyp Wiki](https://github.com/TooTallNate/node-gyp/wiki).
52 See `npm-folders(5)` to learn about where npm puts stuff.
54 In particular, npm has two modes of operation:
57 npm installs packages into the install prefix at
58 `prefix/lib/node_modules` and bins are installed in `prefix/bin`.
60 npm installs packages into the current project directory, which
61 defaults to the current working directory. Packages are installed to
62 `./node_modules`, and bins are installed to `./node_modules/.bin`.
64 Local mode is the default. Use `--global` or `-g` on any command to
65 operate in global mode instead.
69 If you're using npm to develop and publish your code, check out the
70 following help topics:
73 Make a package.json file. See `package.json(5)`.
75 For linking your current working code into Node's path, so that you
76 don't have to reinstall every time you make a change. Use
77 `npm link` to do this.
79 It's a good idea to install things if you don't need the symbolic link.
80 Especially, installing other peoples code from the registry is done via
83 Create an account or log in. Credentials are stored in the
86 Use the `npm publish` command to upload your code to the registry.
90 npm is extremely configurable. It reads its configuration options from
93 * Command line switches:
94 Set a config with `--key val`. All keys take a value, even if they
95 are booleans (the config parser doesn't know what the options are at
96 the time of parsing.) If no value is provided, then the option is set
98 * Environment Variables:
99 Set any config by prefixing the name in an environment variable with
100 `npm_config_`. For example, `export npm_config_key=val`.
102 The file at $HOME/.npmrc is an ini-formatted list of configs. If
103 present, it is parsed. If the `userconfig` option is set in the cli
104 or env, then that will be used instead.
106 The file found at ../etc/npmrc (from the node executable, by default
107 this resolves to /usr/local/etc/npmrc) will be parsed if it is found.
108 If the `globalconfig` option is set in the cli, env, or user config,
109 then that file is parsed instead.
111 npm's default configuration options are defined in
112 lib/utils/config-defs.js. These must not be changed.
114 See `npm-config(7)` for much much more information.
121 Read through `npm-coding-style(7)` if you plan to submit code.
122 You don't have to agree with it, but you do have to follow it.
124 If you find an error in the documentation, edit the appropriate markdown
125 file in the "doc" folder. (Don't worry about generating the man page.)
127 Contributors are listed in npm's `package.json` file. You can view them
128 easily by doing `npm view npm contributors`.
130 If you would like to contribute, but don't know what to work on, read
131 the contributing guidelines and check the issues list.
133 * https://github.com/npm/npm/wiki/Contributing-Guidelines
134 * <https://github.com/npm/npm/issues>
138 When you find issues, please report them:
141 <https://github.com/npm/npm/issues>
143 Be sure to include *all* of the output from the npm command that didn't work
144 as expected. The `npm-debug.log` file is also helpful to provide.
146 You can also look for isaacs in #node.js on irc://irc.freenode.net. He
147 will no doubt tell you to put the output in a gist or email.
151 [Isaac Z. Schlueter](http://blog.izs.me/) ::
152 [isaacs](https://github.com/isaacs/) ::
153 [@izs](http://twitter.com/izs) ::