主题
Windows 11 环境
1. 安装 nvm
Windows 原生环境使用 nvm-windows。进入 Releases 下载并安装最新的 nvm-setup.exe:
https://github.com/coreybutler/nvm-windows/releases
安装后重新打开 PowerShell,验证:
powershell
nvm version2. 设置 nvm 与 npm 镜像
powershell
nvm node_mirror https://npmmirror.com/mirrors/node/
nvm npm_mirror https://npmmirror.com/mirrors/npm/
npm config set registry https://registry.npmmirror.com
npm config get registry3. 安装 Node.js 22.x LTS
powershell
nvm install 22
nvm use 22
node -v
npm -v如果团队需要完全一致的补丁版本,再把 22 替换为项目约定的精确版本,例如 22.22.2。
如果 node 或 npm 命令不可用,关闭当前终端并重新打开 PowerShell。
4. 可选安装:增强 AI 工具能力
安装 ripgrep:
powershell
winget install BurntSushi.ripgrep.MSVC安装 PowerShell 7:
powershell
winget install --id Microsoft.PowerShell验证:
powershell
rg --version
pwsh --versionripgrep 可提升本地代码搜索效率,PowerShell 7 可提供更现代的终端环境,对 Codex、Claude Code、MCP 工具和本地脚本协作更友好。
下一步
继续安装 Python 3.12.x。

