mirror of
https://github.com/titanscouting/tra-analysis.git
synced 2024-11-11 07:24:45 +00:00
176 lines
5.0 KiB
Groff
176 lines
5.0 KiB
Groff
.TH "NPM" "1" "December 2018" "" ""
|
|
.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
|
|
|