mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-28 11:25:16 +08:00
nvm: update page (#22340)
- version alias `stable` has been deprecated by nvm - combined install/uninstall to save example for `ls-remote` - description of `nvm list` is actually for `nvm ls-remote` - `nvm list` is just an alias of `nvm ls`. It is not even in the CLI reference
This commit is contained in:
+9
-9
@@ -1,13 +1,13 @@
|
||||
# nvm
|
||||
|
||||
> Install, uninstall, or switch between Node.js versions.
|
||||
> Supports version numbers like "12.8" or "v16.13.1", and labels like "stable", "system", etc.
|
||||
> Supports version numbers like "12.8" or "v16.13.1", and labels like "node", "system", etc.
|
||||
> See also: `asdf`.
|
||||
> More information: <https://github.com/nvm-sh/nvm#usage>.
|
||||
|
||||
- Install a specific version of Node.js:
|
||||
- Install/uninstall a specific version of Node.js:
|
||||
|
||||
`nvm install {{node_version}}`
|
||||
`nvm {{install|uninstall}} {{node_version}}`
|
||||
|
||||
- Use a specific version of Node.js in the current shell:
|
||||
|
||||
@@ -17,21 +17,21 @@
|
||||
|
||||
`nvm alias default {{node_version}}`
|
||||
|
||||
- List all available Node.js versions and highlight the default one:
|
||||
- List remote versions available for install, only show LTS (long-term support) versions:
|
||||
|
||||
`nvm list`
|
||||
`nvm ls-remote --lts`
|
||||
|
||||
- Uninstall a given Node.js version:
|
||||
- List installed versions:
|
||||
|
||||
`nvm uninstall {{node_version}}`
|
||||
`nvm {{[ls|list]}}`
|
||||
|
||||
- Launch the REPL of a specific version of Node.js:
|
||||
|
||||
`nvm run {{node_version}} --version`
|
||||
`nvm run {{node_version}}`
|
||||
|
||||
- Execute a script in a specific version of Node.js:
|
||||
|
||||
`nvm exec {{node_version}} node {{app.js}}`
|
||||
`nvm exec {{node_version}} node {{path/to/script.js}}`
|
||||
|
||||
- Upgrade to the latest working npm version on the current Node.js version:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user