1NPM(1)                                                                  NPM(1)
2
3
4

NAME

6       npm - a JavaScript package manager
7
8       Build      Status      https://img.shields.io/travis/npm/cli/latest.svg
9       https://travis-ci.org/npm/cli
10

SYNOPSIS

12       This is just enough info to get you up and running.
13
14       Much more info will be available via npm help once it's installed.
15

IMPORTANT

17       You need node v6 or higher to run this program.
18
19       To install an old and unsupported version of npm that works on node  v5
20       and  prior,  clone  the  git  repo  and  dig  through  the old tags and
21       branches.
22
23       npm is configured to use npm, Inc.'s public  registry  at  https://reg
24       istry.npmjs.org  by  default. Use of the npm public registry is subject
25       to terms of use available at https://www.npmjs.com/policies/terms.
26
27       You can configure npm to use any compatible registry you like, and even
28       run   your   own   registry.   Check   out   the   doc   on  registries
29       https://docs.npmjs.com/misc/registry.
30

Super Easy Install

32       npm is bundled with node https://nodejs.org/en/download/.
33
34   Windows Computers
35       Get the MSI https://nodejs.org/en/download/.  npm is in it.
36
37   Apple Macintosh Computers
38       Get the pkg https://nodejs.org/en/download/.  npm is in it.
39
40   Other Sorts of Unices
41       Run make install.  npm will be installed with node.
42
43       If you want a more fancy pants install (a different version, customized
44       paths, etc.) then read on.
45

Fancy Install (Unix)

47       There's      a      pretty      robust      install      script      at
48       https://www.npmjs.com/install.sh.  You can download that and run it.
49
50       Here's an example using curl:
51
52         curl -L https://www.npmjs.com/install.sh | sh
53
54   Slightly Fancier
55       You can set any npm configuration params with that script:
56
57         npm_config_prefix=/some/path sh install.sh
58
59       Or, you can run it in uber-debuggery mode:
60
61         npm_debug=1 sh install.sh
62
63   Even Fancier
64       Get the code with git.  Use make to build the docs and do other  stuff.
65       If you plan on hacking on npm, make link is your friend.
66
67       If  you've  got  the npm source code, you can also semi-permanently set
68       arbitrary config keys using the ./configure --key=val ..., and then run
69       npm  commands  by doing node bin/npm-cli.js <command> <args>.  (This is
70       helpful for testing, or running stuff without actually  installing  npm
71       itself.)
72

Windows Install or Upgrade

74       Many  improvements for Windows users have been made in npm 3 - you will
75       have a better experience if  you  run  a  recent  version  of  npm.  To
76       upgrade,       either       use      Microsoft's      upgrade      tool
77       https://github.com/felixrieseberg/npm-windows-upgrade, download  a  new
78       version  of Node https://nodejs.org/en/download/, or follow the Windows
79       upgrade instructions in the Installing/upgrading npm https://npm.commu
80       nity/t/installing-upgrading-npm/251/2 post.
81
82       If  that's  not  fancy enough for you, then you can fetch the code with
83       git, and mess with it directly.
84

Installing on Cygwin

86       No.
87

Uninstalling

89       So sad to see you go.
90
91         sudo npm uninstall npm -g
92
93       Or, if that fails,
94
95         sudo make uninstall
96

More Severe Uninstalling

98       Usually, the above instructions are sufficient.  That will remove  npm,
99       but leave behind anything you've installed.
100
101       If  you  would like to remove all the packages that you have installed,
102       then you can use the npm ls command to find them, and then  npm  rm  to
103       remove them.
104
105       To  remove  cruft  left  behind  by  npm  0.x, you can use the included
106       clean-old.sh script file.  You can run it conveniently like this:
107
108         npm explore npm -g -- sh scripts/clean-old.sh
109
110       npm uses two configuration files, one for per-user configs, and another
111       for global (every-user) configs.  You can view them by doing:
112
113         npm config get userconfig   # defaults to ~/.npmrc
114         npm config get globalconfig # defaults to /usr/local/etc/npmrc
115
116       Uninstalling  npm  does not remove configuration files by default.  You
117       must remove them yourself manually if you want them  gone.   Note  that
118       this means that future npm installs will not remember the settings that
119       you have chosen.
120

More Docs

122       Check out the docs https://docs.npmjs.com/.
123
124       You can use the npm help command to read any of them.
125
126       If you're a developer, and you want to use npm to publish your program,
127       you should read this https://docs.npmjs.com/misc/developers.
128

BUGS

130       When you find issues, please report them:
131
132       · web: https://npm.community/c/bugs
133
134
135       Be  sure  to include all of the output from the npm command that didn't
136       work as expected.  The npm-debug.log file is also helpful to provide.
137

SEE ALSO

139       · npm(1)
140
141       · npm-help(1)
142
143
144
145
146                                 February 2021                          NPM(1)
Impressum