node.js npm 版本不匹配问题

报错:

mbp:dd248 jooyzhao$ npm install frida

ERROR: npm v10.2.4 is known not to run on Node.js v14.21.3. This version of npm supports the following node versions: `^18.17.0 || >=20.5.0`. You can find the latest version at https://nodejs.org/.

ERROR:

/Users/jooyzhao/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/@npmcli/agent/lib/agents.js:105

options.lookup ??= this.#options.lookup

^^^

SyntaxError: Unexpected token '??='

at wrapSafe (internal/modules/cjs/loader.js:1029:16)

at Module._compile (internal/modules/cjs/loader.js:1078:27)

at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)

at Module.load (internal/modules/cjs/loader.js:979:32)

at Function.Module._load (internal/modules/cjs/loader.js:819:12)

at Module.require (internal/modules/cjs/loader.js:1003:19)

at require (internal/modules/cjs/helpers.js:107:18)

at Object.<anonymous> (/Users/jooyzhao/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/@npmcli/agent/lib/index.js:7:15)

at Module._compile (internal/modules/cjs/loader.js:1114:14)

at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)

mbp:dd248 jooyzhao$ node -v

v14.21.3

翻译:

npm当前版本为,node当前版本为,两者不兼容。

解决办法:

卸载node后重装

相关推荐
求知若饥5 小时前
webpage-channel 让不同页面通信像组件通信一样简便
前端·typescript·node.js
小霍同学6 小时前
NVM —— Node.js 版本管理工具
node.js
嵌入式-老费7 小时前
vivado hls的应用(axis接口)
前端·webpack·node.js
无巧不成书02189 小时前
Node.js全平台安装教程
windows·node.js·node.js安装·npm国内镜像配置·nvm管理node.js版本·macos m1安装
zhenxin012211 小时前
2024最新版Node.js下载安装及环境配置教程【保姆级】
node.js
Hommy8812 小时前
【开源剪映小助手-客户端】Node.js 集成
开源·node.js
竹林8181 天前
在Web3前端用Node.js子进程批量校验钱包,我踩了这些性能与安全的坑
javascript·node.js
oyzz1201 天前
Windows 上彻底卸载 Node.js
windows·node.js
小霍同学1 天前
Node.js 起步指南
node.js
codingWhat1 天前
用 Express 简单Mock自助终端机读取身份证
node.js·express