summaryrefslogtreecommitdiff
path: root/deps/npm/man/man1/npm-README.1
blob: d616e80ebb5319b8d3cd3e96542c1905b4eb7afb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
.TH "NPM" "1" "January 2019" "" ""
.SH "NAME"
\fBnpm\fR \- a JavaScript package manager
.P
Build Status \fIhttps://img\.shields\.io/travis/npm/cli/latest\.svg\fR \fIhttps://travis\-ci\.org/npm/cli\fR
.SH SYNOPSIS
.P
This is just enough info to get you up and running\.
.P
Much more info will be available via \fBnpm help\fP once it's installed\.
.SH IMPORTANT
.P
\fBYou need node v6 or higher to run this program\.\fR
.P
To install an old \fBand unsupported\fR version of npm that works on node v5
and prior, clone the git repo and dig through the old tags and branches\.
.P
\fBnpm is configured to use npm, Inc\.'s public registry at
https://registry\.npmjs\.org by default\.\fR Use of the npm public registry
is subject to terms of use available at https://www\.npmjs\.com/policies/terms\|\.
.P
You can configure npm to use any compatible registry you
like, and even run your own registry\. Check out the doc on
registries \fIhttps://docs\.npmjs\.com/misc/registry\fR\|\.
.SH Super Easy Install
.P
npm is bundled with node \fIhttps://nodejs\.org/en/download/\fR\|\.
.SS Windows Computers
.P
Get the MSI \fIhttps://nodejs\.org/en/download/\fR\|\.  npm is in it\.
.SS Apple Macintosh Computers
.P
Get the pkg \fIhttps://nodejs\.org/en/download/\fR\|\.  npm is in it\.
.SS Other Sorts of Unices
.P
Run \fBmake install\fP\|\.  npm will be installed with node\.
.P
If you want a more fancy pants install (a different version, customized
paths, etc\.) then read on\.
.SH Fancy Install (Unix)
.P
There's a pretty robust install script at
https://www\.npmjs\.com/install\.sh\|\.  You can download that and run it\.
.P
Here's an example using curl:
.P
.RS 2
.nf
curl \-L https://www\.npmjs\.com/install\.sh | sh
.fi
.RE
.SS Slightly Fancier
.P
You can set any npm configuration params with that script:
.P
.RS 2
.nf
npm_config_prefix=/some/path sh install\.sh
.fi
.RE
.P
Or, you can run it in uber\-debuggery mode:
.P
.RS 2
.nf
npm_debug=1 sh install\.sh
.fi
.RE
.SS Even Fancier
.P
Get the code with git\.  Use \fBmake\fP to build the docs and do other stuff\.
If you plan on hacking on npm, \fBmake link\fP is your friend\.
.P
If you've got the npm source code, you can also semi\-permanently set
arbitrary config keys using the \fB\|\./configure \-\-key=val \.\.\.\fP, and then
run npm commands by doing \fBnode bin/npm\-cli\.js <command> <args>\fP\|\.  (This is helpful
for testing, or running stuff without actually installing npm itself\.)
.SH Windows Install or Upgrade
.P
Many improvements for Windows users have been made in npm 3 \- you will have a better
experience if you run a recent version of npm\. To upgrade, either use Microsoft's
upgrade tool \fIhttps://github\.com/felixrieseberg/npm\-windows\-upgrade\fR,
download a new version of Node \fIhttps://nodejs\.org/en/download/\fR,
or follow the Windows upgrade instructions in the
Installing/upgrading npm \fIhttps://npm\.community/t/installing\-upgrading\-npm/251/2\fR post\.
.P
If that's not fancy enough for you, then you can fetch the code with
git, and mess with it directly\.
.SH Installing on Cygwin
.P
No\.
.SH Uninstalling
.P
So sad to see you go\.
.P
.RS 2
.nf
sudo npm uninstall npm \-g
.fi
.RE
.P
Or, if that fails,
.P
.RS 2
.nf
sudo make uninstall
.fi
.RE
.SH More Severe Uninstalling
.P
Usually, the above instructions are sufficient\.  That will remove
npm, but leave behind anything you've installed\.
.P
If you would like to remove all the packages that you have installed,
then you can use the \fBnpm ls\fP command to find them, and then \fBnpm rm\fP to
remove them\.
.P
To remove cruft left behind by npm 0\.x, you can use the included
\fBclean\-old\.sh\fP script file\.  You can run it conveniently like this:
.P
.RS 2
.nf
npm explore npm \-g \-\- sh scripts/clean\-old\.sh
.fi
.RE
.P
npm uses two configuration files, one for per\-user configs, and another
for global (every\-user) configs\.  You can view them by doing:
.P
.RS 2
.nf
npm config get userconfig   # defaults to ~/\.npmrc
npm config get globalconfig # defaults to /usr/local/etc/npmrc
.fi
.RE
.P
Uninstalling npm does not remove configuration files by default\.  You
must remove them yourself manually if you want them gone\.  Note that
this means that future npm installs will not remember the settings that
you have chosen\.
.SH More Docs
.P
Check out the docs \fIhttps://docs\.npmjs\.com/\fR\|\.
.P
You can use the \fBnpm help\fP command to read any of them\.
.P
If you're a developer, and you want to use npm to publish your program,
you should read this \fIhttps://docs\.npmjs\.com/misc/developers\fR\|\.
.SH BUGS
.P
When you find issues, please report them:
.RS 0
.IP \(bu 2
web:
https://npm\.community/c/bugs

.RE
.P
Be sure to include \fIall\fR of the output from the npm command that didn't work
as expected\.  The \fBnpm\-debug\.log\fP file is also helpful to provide\.
.P
You can also find npm people in \fB#npm\fP on https:// or
on Twitter \fIhttps://twitter\.com/npm_support\fR\|\.  Whoever responds will no
doubt tell you to put the output in a gist or email\.
.SH SEE ALSO
.RS 0
.IP \(bu 2
npm help npm
.IP \(bu 2
npm help help
.IP \(bu 2
npm help 7 index

.RE