在MacOS 10.15上安装Node.js

继续在MacOS 10.15上折腾,这次是安装Node.js。

使用Homebrew安装Node.js,命令brew install node安装当前最新版本的Node.js,提示xcode版本太低,如下图

bash 复制代码
==> Installing node@18 dependency: lzip
==> Downloading https://formulae.brew.sh/api/cask_tap_migrations.jws.json
Error: Your Xcode (10.1 => /Volumes/macOS beta/Applications/Xcode.app/Contents/Developer) at /Volumes/macOS beta/Applications/Xcode.app is too outdated.
Please update to Xcode 12.4 (or delete it).
Xcode can be updated from the App Store.

使用命令brew install node@18尝试安装Node.js 18的版本,得到了同样的错误提示。

使用命令brew install node@16尝试安装Node.js 16的版本,提示node@16已经被禁用了,如下图

bash 复制代码
Error: node@16 has been disabled because it is not supported upstream! It was disabled on 2024-11-03.

这意味着通过Homebrew安装Node.js的这条路已经行不通了。

尝试去Node.js官网下载pkg安装包,安装一切正常。

命令行里执行npm命令一切正常,完美。看起来并不是Node.js 18依赖更高版本的xcode,而是Node.js 18的某个依赖组件需要依赖更高版本的xcode。

相关推荐
aosky21 小时前
手机远程畅玩OpenAI Codex
macos·智能手机·cocoa
yuanlaile21 小时前
从入门到部署|2026年Koa全栈开发实战:覆盖Node.js、数据库、部署与云架构全链路
微服务·云原生·kubernetes·node.js·serverless·nodejs全栈开发
onebyte8bits1 天前
NestJS 系列教程(十八):文件上传与对象存储架构(Multer + S3/OSS + 访问控制)
前端·架构·node.js·状态模式·nestjs
苏瞳儿1 天前
前端/后端-配置跨域
前端·javascript·node.js·vue
A懿轩A1 天前
【2026 最新】Python 下载与安装:在 macOS 下使用 Homebrew 和 pyenv 完美管理多版本 Python
python·macos·mac
IKaros_α‌1 天前
mac上安装openclaw从入门到删除
macos
x-cmd1 天前
macOS 内存模型深度解析 | x free 设计哲学
linux·macos·内存·策略模式·free·x-cmd
itinymeng1 天前
在 macOS 上遇到 brew: command not found 错误,通常是因为 ‌Homebrew 未安装‌ 或 ‌PATH 环境变量未正确配置‌
macos
oscar9991 天前
Claude Code 的“计算机使用”功能:让命令行助手真正操控macOS桌面
macos·claude code·computer