Files
tldr/pages.zh/common/nodenv.md

28 lines
537 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# nodenv
> 管理 Node.js 版本。
> 更多信息:<https://github.com/nodenv/nodenv>。
- 安装特定版本的 Node.js
`nodenv install {{version}}`
- 显示可用版本的列表:
`nodenv install --list`
- 在整个系统中使用特定版本的 Node.js
`nodenv global {{version}}`
- 在某个目录中使用特定版本的 Node.js
`nodenv local {{version}}`
- 显示当前目录的 Node.js 版本:
`nodenv version`
- 显示已安装的 Node.js 命令(例如 `npm`)的位置:
`nodenv which {{command}}`