nodejs环境搭建、安装、镜像

杂七杂八 · 07-14 · 90 人浏览

安装版本管理

方便管理nodejs版本,切换。

安装

https://github.com/coreybutler/nvm-windows/releases

## 设置镜像
npm config set registry https://registry.npmmirror.com
# 设置pnpm 防止到处拉屎
npm install -g pnpm@latest 

NVM 版本管理

# 安装
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

# 设置镜像
export NVM_NODEJS_ORG_MIRROR=https://mirrors.aliyun.com/nodejs-release/
# 安装版本
nvm install 18
# 设置版本
nvm use 18
# 默认版本
nvm alias default 18
Theme Jasmine by Kent Liao