1 .TH "NPM" "1" "September 2015" "" ""
3 \fBnpm\fR \- javascript package manager
16 npm is the package manager for the Node JavaScript platform\. It puts
17 modules in place so that node can find them, and manages dependency
18 conflicts intelligently\.
20 It is extremely configurable to support a wide variety of use cases\.
21 Most commonly, it is used to publish, discover, install, and develop node
24 Run \fBnpm help\fP to get a list of available commands\.
27 You probably got npm because you want to install stuff\.
29 Use \fBnpm install blerg\fP to install the latest version of "blerg"\. Check out
30 npm help \fBnpm\-install\fP for more info\. It can do a lot of stuff\.
32 Use the \fBnpm search\fP command to show everything that's available\.
33 Use \fBnpm ls\fP 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 \fIhttps://github\.com/TooTallNate/node\-gyp\fR for that task\.
42 For a Unix system, node\-gyp \fIhttps://github\.com/TooTallNate/node\-gyp\fR
43 needs Python, make and a buildchain like GCC\. On Windows,
44 Python and Microsoft Visual Studio C++ is needed\. Python 3 is
45 not supported by node\-gyp \fIhttps://github\.com/TooTallNate/node\-gyp\fR\|\.
46 For more information visit
47 the node\-gyp repository \fIhttps://github\.com/TooTallNate/node\-gyp\fR and
48 the node\-gyp Wiki \fIhttps://github\.com/TooTallNate/node\-gyp/wiki\fR\|\.
51 See npm help 5 \fBnpm\-folders\fP to learn about where npm puts stuff\.
53 In particular, npm has two modes of operation:
58 npm installs packages into the install prefix at
59 \fBprefix/lib/node_modules\fP and bins are installed in \fBprefix/bin\fP\|\.
63 npm installs packages into the current project directory, which
64 defaults to the current working directory\. Packages are installed to
65 \fB\|\./node_modules\fP, and bins are installed to \fB\|\./node_modules/\.bin\fP\|\.
69 Local mode is the default\. Use \fB\-\-global\fP or \fB\-g\fP on any command to
70 operate in global mode instead\.
73 If you're using npm to develop and publish your code, check out the
74 following help topics:
78 Make a package\.json file\. See npm help 5 \fBpackage\.json\fP\|\.
81 For linking your current working code into Node's path, so that you
82 don't have to reinstall every time you make a change\. Use
83 \fBnpm link\fP to do this\.
86 It's a good idea to install things if you don't need the symbolic link\.
87 Especially, installing other peoples code from the registry is done via
91 Create an account or log in\. Credentials are stored in the
95 Use the \fBnpm publish\fP command to upload your code to the registry\.
100 npm is extremely configurable\. It reads its configuration options from
104 Command line switches:
106 Set a config with \fB\-\-key val\fP\|\. All keys take a value, even if they
107 are booleans (the config parser doesn't know what the options are at
108 the time of parsing\.) If no value is provided, then the option is set
109 to boolean \fBtrue\fP\|\.
111 Environment Variables:
113 Set any config by prefixing the name in an environment variable with
114 \fBnpm_config_\fP\|\. For example, \fBexport npm_config_key=val\fP\|\.
118 The file at $HOME/\.npmrc is an ini\-formatted list of configs\. If
119 present, it is parsed\. If the \fBuserconfig\fP option is set in the cli
120 or env, then that will be used instead\.
124 The file found at \.\./etc/npmrc (from the node executable, by default
125 this resolves to /usr/local/etc/npmrc) will be parsed if it is found\.
126 If the \fBglobalconfig\fP option is set in the cli, env, or user config,
127 then that file is parsed instead\.
131 npm's default configuration options are defined in
132 lib/utils/config\-defs\.js\. These must not be changed\.
136 See npm help 7 \fBnpm\-config\fP for much much more information\.
143 Read through npm help 7 \fBnpm\-coding\-style\fP if you plan to submit code\.
144 You don't have to agree with it, but you do have to follow it\.
147 If you find an error in the documentation, edit the appropriate markdown
148 file in the "doc" folder\. (Don't worry about generating the man page\.)
152 Contributors are listed in npm's \fBpackage\.json\fP file\. You can view them
153 easily by doing \fBnpm view npm contributors\fP\|\.
155 If you would like to contribute, but don't know what to work on, check
156 the issues list or ask on the mailing list\.
159 http://github\.com/npm/npm/issues
161 npm\-@googlegroups\.com
166 When you find issues, please report them:
170 http://github\.com/npm/npm/issues
173 npm\-@googlegroups\.com
177 Be sure to include \fIall\fR of the output from the npm command that didn't work
178 as expected\. The \fBnpm\-debug\.log\fP file is also helpful to provide\.
180 You can also look for isaacs in #node\.js on irc://irc\.freenode\.net\. He
181 will no doubt tell you to put the output in a gist or email\.
184 Isaac Z\. Schlueter \fIhttp://blog\.izs\.me/\fR ::
185 isaacs \fIhttps://github\.com/isaacs/\fR ::
186 @izs \fIhttp://twitter\.com/izs\fR ::
197 npm help 5 package\.json