gpt4 book ai didi

node.js - 为什么我总是收到此错误 "gyp ERR! stack"NodeJS?

转载 作者:太空宇宙 更新时间:2023-11-04 02:59:56 26 4
gpt4 key购买 nike

当我安装新的 npm 包时,我总是收到此错误:

gyp: No Xcode or CLT version detected!
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:321:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/Users/baruchmashasha/Desktop/Deloitte-DS-Server/node_modules/node/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/baruchmashasha/Desktop/Deloitte-DS-Server/node_modules/fsevents
gyp ERR! node -v v13.9.0
gyp ERR! node-gyp -v v5.0.7
gyp ERR! not ok

我在这里阅读了一些帖子并尝试修复它,但它仍然出现。服务器运行良好,但这个错误困扰着我。谢谢

最佳答案

请阅读此内容:https://github.com/nodejs/node-gyp#on-macos

摘录:

On macOS

Python v2.7, v3.5, v3.6, or v3.7

Xcode

You also need to install the XCode Command Line Tools by running xcode-select --install. Alternatively, if you already have the full Xcode installed, you can find them under the menu Xcode -> Open Developer Tool -> More Developer Tools.... This step will install clang, clang++, and make.

If your Mac has been upgraded to macOS Catalina (10.15), please read macOS_Catalina.md.

关于node.js - 为什么我总是收到此错误 "gyp ERR! stack"NodeJS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60488655/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com