nodejs 版本管理
专栏文章
python我们使用env来管理不同版本之间的切换。nodejs是否有类似的切换版本的方法哪?本文提供一种在mac上快速切换nodejs版本的方法。
n
npm i -g n
sudo n v11
node --versionnvm
nvm(Node Version Manager) node 版本管理工具
安装
- Linux
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash- windows
https://github.com/coreybutler/nvm-windows/releases
使用
source ~/.bashrc
# 查看支持的版本,访问 https://nodejs.org/dist/index.json 获取的列表
nvm list available
#安装
nvm install 12
# 切换
nvm use 16其他
类似的工具:
- volta 无忧无虑的JavaScript工具管理器
# install Volta
curl https://get.volta.sh | bash
# install Node
volta install node
volta install node@16
# start using Node
node- 上一页: 使用 tini 优雅的关闭 Docker 进程
- 下一页: Cobbler 无值守自动按照操作系统
专栏文章
- Bun: 运行JavaScript 和TypeScript 应用程序的集成工具包
- nodejs 版本管理(当前)
- NPM Registry Proxy 配置
- npm 常用命令
- 使用 forever 运行 nodejs 应用
最近更新
最新评论