Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 88 lines (58 sloc) 2.379 kB
0ce99a3 @isaacs Somehow lost the install doc. Restored
isaacs authored
1 npm-install(1) -- install a package
2 ===================================
3
64afd3d @isaacs Clean up the docs further. Make them more consistent.
isaacs authored
4 ## SYNOPSIS
0ce99a3 @isaacs Somehow lost the install doc. Restored
isaacs authored
5
de40c65 @isaacs Document new install behavior.
isaacs authored
6 npm install <tarball file>
7 npm install <tarball url>
8 npm install <pkg>
9 npm install <pkg>@<tag>
10 npm install <pkg>@<version>
11 npm install <pkg>@<version range>
0ce99a3 @isaacs Somehow lost the install doc. Restored
isaacs authored
12
13 ## DESCRIPTION
14
de40c65 @isaacs Document new install behavior.
isaacs authored
15 This command installs a package, and any packages that it depends on. It
16 resolves circular dependencies by talking to the npm registry.
0ce99a3 @isaacs Somehow lost the install doc. Restored
isaacs authored
17
de40c65 @isaacs Document new install behavior.
isaacs authored
18 * npm install <tarball file>:
19 Install a package that is sitting on the filesystem. Note: if you just want
20 to link a dev directory into your npm root, you can do this more easily by
21 using `npm link`.
0ce99a3 @isaacs Somehow lost the install doc. Restored
isaacs authored
22
de40c65 @isaacs Document new install behavior.
isaacs authored
23 In order to distinguish between this and remote installs, the argument
24 must start with either "file:", ".", or "/"
0ce99a3 @isaacs Somehow lost the install doc. Restored
isaacs authored
25
de40c65 @isaacs Document new install behavior.
isaacs authored
26 Example:
8629daa @isaacs Add pointers and make the install doc a bit more up to date
isaacs authored
27
de40c65 @isaacs Document new install behavior.
isaacs authored
28 npm install ./package.tgz
8629daa @isaacs Add pointers and make the install doc a bit more up to date
isaacs authored
29
de40c65 @isaacs Document new install behavior.
isaacs authored
30 * npm install <tarball url>:
31 Fetch the tarball url, and then install it. In order to distinguish between
32 this and other options, the argument must start with "http://" or "https://"
33
34 Example:
35
36 npm install http://github.com/waveto/node-crypto/tarball/v0.0.5
37
38 * npm install <pkg>:
39 Do a <pkg>@<tag> install, where <tag> is the "tag" config from either your
40 .npmrc file, or the --tag argument on the command line.
41
42 Example:
43
44 npm install sax
45
46 * npm install <pkg>@<tag>:
47 Install the version of the package that is referenced by the specified tag.
48 If the tag does not exist in the registry data for that package, then this
49 will fail.
50
51 Example:
52
53 npm install sax@stable
54
55 * npm install <pkg>@<version>:
56 Install the specified version of the package. This will fail if the version
57 has not been published to the registry.
58
59 Example:
60
61 npm install sax@0.1.1
62
63 * npm install <pkg>@<version range>:
64 Install a version of the package matching the specified version range. This
65 will follow the same rules for resolving dependencies described in `npm help json`.
66
67 Note that most version ranges must be put in quotes so that your shell will
68 treat it as a single argument.
69
70 Example:
71
72 npm install sax@">=0.1.0 <0.2.0"
73
74 You may combine multiple arguments, and even multiple types of arguments. For example:
75
76 npm install sax@">=0.1.0 <0.2.0" bench supervisor
77
78 The `--tag` argument will apply to all of the specified install targets.
8629daa @isaacs Add pointers and make the install doc a bit more up to date
isaacs authored
79
64afd3d @isaacs Clean up the docs further. Make them more consistent.
isaacs authored
80 ## SEE ALSO
8629daa @isaacs Add pointers and make the install doc a bit more up to date
isaacs authored
81
13eff18 @isaacs Recommend man npm-foo instead of npm help foo
isaacs authored
82 * npm-build(1)
83 * npm-registry(1)
84 * npm-build(1)
85 * npm-link(1)
86 * npm-folders(1)
87 * npm-tag(1)
Something went wrong with that request. Please try again.