跳到主要内容

macOS 平台

macOS 用户可以通过官方安装包、Homebrew 或版本管理工具安装 Node.js。普通用户优先使用官方 LTS 安装包。

Homebrew 安装

brew install node
node -v
npm -v

终端建议

使用 zsh、iTerm2 或系统终端都可以。配置 API Key 时,注意当前 shell 的环境变量文件是 .zshrc.bashrc 还是工具自己的配置文件。