报错:
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当前版本为,两者不兼容。
解决办法:文章来源:https://www.toymoban.com/news/detail-823551.html
卸载node后重装文章来源地址https://www.toymoban.com/news/detail-823551.html
到了这里,关于node.js npm 版本不匹配问题的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!