检查是否已安装
在 Windows / macOS / Linux / WSL2 下输入以下命令:如果有版本号输出(例如
v18.x.x),表示已安装,可跳过本节。安装 Node.js
- Windows
- macOS
- Linux / WSL2
- 访问 Node.js 官网下载页
- 下载 LTS 版本并安装(
.msi) - 或使用包管理器:
node --version 验证。Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
安装 Node.js 18+ 环境,为后续 CLI / 脚本使用做准备
node --version
npm --version
v18.x.x),表示已安装,可跳过本节。.msi)choco install nodejs
# 或
scoop install nodejs
brew update
brew install node
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
node --version 验证。