这个问题谁遇到过呀如何处理呀?

2023-06-17 21:56:42 +08:00
 zsvc

环境是 msoc m2

sudo npm install ffi -g npm ERR! code 1 npm ERR! path /usr/local/lib/node_modules/ffi/node_modules/ref npm ERR! command failed npm ERR! command sh -c node-gyp rebuild npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.3.1 npm ERR! gyp info using node@18.16.0 | darwin | x64 npm ERR! gyp info find Python using Python version 3.9.6 found at "/Applications/Xcode.app/Contents/Developer/usr/bin/python3" npm ERR! gyp ERR! configure error npm ERR! gyp ERR! stack Error: Invalid version number: 10.15 npm ERR! gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:57:25) npm ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:31:7 npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:77:11) npm ERR! gyp ERR! System Darwin 22.5.0 npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" npm ERR! gyp ERR! cwd /usr/local/lib/node_modules/ffi/node_modules/ref npm ERR! gyp ERR! node -v v18.16.0 npm ERR! gyp ERR! node-gyp -v v9.3.1 npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in: npm ERR! /Users/zhengbin/.npm/_logs/2023-06-17T13_54_58_253Z-debug-0.log

970 次点击
所在节点    程序员
1 条回复
xuanbg
2023-06-18 08:33:07 +08:00
gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.3.1 npm ERR! gyp info using node@18.16.0

node 版本不兼容的问题。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/949611

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX