You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.markdown
+27-9Lines changed: 27 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ Note: On OS X, if you have/had a "system" node installed and want to install mod
28
28
- If you have an `~/.npmrc` file, make sure it does not contain any `prefix` settings (which is not compatible with nvm)
29
29
- You can (but should not?) keep your previous "system" node install, but nvm will only be available to your user account (the one used to install nvm). This might cause version mismatches, as other users will be using `/usr/local/lib/node_modules/*` VS your user account using `~/.nvm/versions/node/vX.X.X/lib/node_modules/*`
30
30
31
-
Homebrew installation is not supported.
31
+
Homebrew installation is not supported. If you have issues with homebrew-installed `nvm`, please `brew uninstall` it, and install it using the instructions below, before filing an issue.
32
32
33
33
Note: If you're using `zsh` you can easily install `nvm` as a zsh plugin. Install [`zsh-nvm`](https://github.com/lukechilds/zsh-nvm) and run `nvm_update` to update.
34
34
@@ -112,22 +112,22 @@ After upgrading, don't forget to activate the new version:
112
112
113
113
## Usage
114
114
115
-
To download, compile, and install the latest v5.0.x release of node, do this:
115
+
To download, compile, and install the latest release of node, do this:
116
116
117
117
```sh
118
-
nvm install 5.0
118
+
nvm install node
119
119
```
120
120
121
121
And then in any new shell just use the installed version:
122
122
123
123
```sh
124
-
nvm use 5.0
124
+
nvm use node
125
125
```
126
126
127
127
Or you can just run it:
128
128
129
129
```sh
130
-
nvm run 5.0 --version
130
+
nvm run node --version
131
131
```
132
132
Or, you can run any arbitrary command in a subshell with the desired version of node:
133
133
@@ -148,6 +148,19 @@ In place of a version pointer like "0.10" or "5.0" or "4.2.1", you can use the f
148
148
-`stable`: this alias is deprecated, and only truly applies to `node``v0.12` and earlier. Currently, this is an alias for `node`.
149
149
-`unstable`: this alias points to `node``v0.11` - the last "unstable" node release, since post-1.0, all node versions are stable. (in semver, versions communicate breakage, not stability).
150
150
151
+
### Long-term support
152
+
Node has a [schedule](https://github.com/nodejs/LTS#lts_schedule) for long-term support (LTS) You can reference LTS versions in aliases and `.nvmrc` files with the notation `lts/*` for the latest LTS, and `lts/argon` for LTS releases from the "argon" line, for example. In addition, the following commands support LTS arguments:
Any time your local copy of `nvm` connects to https://nodejs.org, it will re-create the appropriate local aliases for all available LTS lines. These aliases (stored under `$NVM_DIR/alias/lts`), are managed by `nvm`, and you should not modify, remove, or create these files - expect your changes to be undone, and expect meddling with these files to cause bugs that will likely not be supported.
162
+
163
+
### Migrating global packages while installing
151
164
If you want to install a new version of Node.js and migrate npm packages from a previous version:
152
165
153
166
```sh
@@ -159,10 +172,11 @@ This will first use "nvm version node" to identify the current version you're mi
159
172
You can also install and migrate npm packages from specific versions of Node like this:
160
173
161
174
```sh
162
-
nvm install v5.0 --reinstall-packages-from=4.2
175
+
nvm install 6 --reinstall-packages-from=5
163
176
nvm install v4.2 --reinstall-packages-from=iojs
164
177
```
165
178
179
+
### io.js
166
180
If you want to install [io.js](https://github.com/iojs/io.js/):
`nvm use` will not, by default, create a "current" symlink. Set `$NVM_SYMLINK_CURRENT` to "true" to enable this behavior, which is sometimes useful for IDEs.
245
+
`nvm use` will not, by default, create a "current" symlink. Set `$NVM_SYMLINK_CURRENT` to "true" to enable this behavior, which is sometimes useful for IDEs. Note that using `nvm` in multiple shell tabs with this environment variable enabled can cause race conditions.
230
246
231
247
### .nvmrc
232
248
@@ -237,6 +253,8 @@ For example, to make nvm default to the latest 5.9 release for the current direc
237
253
238
254
```sh
239
255
$ echo"5.9"> .nvmrc
256
+
257
+
$ echo"lts/*"> .nvmrc # to default to the latest LTS version
240
258
```
241
259
242
260
Then when you run nvm:
@@ -280,7 +298,7 @@ load-nvmrc
280
298
nvm is released under the MIT license.
281
299
282
300
283
-
Copyright (C) 2010-2016 Tim Caswell
301
+
Copyright (C) 2010-2016 Tim Caswell and Jordan Harband
284
302
285
303
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
0 commit comments