npm install 并在 node-gyp 重建时失败,使用 ```gyp:未检测到 Xcode 或 CLT 版本!``` 由新的 macos catalina 更新引起 [英] npm install and fails on node-gyp rebuild with ```gyp: No Xcode or CLT version detected!``` caused by new macos catalina update
问题描述
gyp:未检测到 Xcode 或 CLT 版本!吉普错误!配置错误吉普错误!堆栈错误:gyp
失败,退出代码:1吉普错误!ChildProcess.onCpExit 上的堆栈(/Users/synapse/.nvm/versions/node/v8.8.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:344:16)吉普错误!堆栈在emitTwo (events.js:125:13)吉普错误!ChildProcess.emit 上的堆栈 (events.js:213:7)吉普错误!堆栈在 Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)吉普错误!系统达尔文 19.3.0吉普错误!命令/Users/synapse/.nvm/versions/node/v8.8.0/bin/node"/Users/synapse/.nvm/versions/node/v8.8.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"重建"吉普错误!cwd/Users/synapse/Documents/synapsefi-dev-ui/node_modules/watchpack/node_modules/fsevents吉普错误!节点 -v v8.8.0吉普错误!节点-gyp -v v5.0.3吉普错误!不好npm WARN synapsefi-dev-ui@2.0.20 没有存储库字段.npm WARN 包 country-data 作为开发和生产依赖项包含在内.npm WARN 包 react-dropzone 作为开发和生产依赖项包含在内.npm WARN 可选 SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/watchpack/node_modules/fsevents):npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 in
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 (/Users/synapse/.nvm/versions/node/v8.8.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:344:16)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/Users/synapse/.nvm/versions/node/v8.8.0/bin/node" "/Users/synapse/.nvm/versions/node/v8.8.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/synapse/Documents/synapsefi-dev-ui/node_modules/watchpack/node_modules/fsevents
gyp ERR! node -v v8.8.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
npm WARN synapsefi-dev-ui@2.0.20 No repository field.
npm WARN The package country-data is included as both a dev and production dependency.
npm WARN The package react-dropzone is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/watchpack/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 in
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 (/Users/synapse/.nvm/versions/node/v8.8.0/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:344:16)
gyp ERR! stack at emitTwo (events.js:125:13)
gyp ERR! stack at ChildProcess.emit (events.js:213:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 19.3.0
gyp ERR! command "/Users/synapse/.nvm/versions/node/v8.8.0/bin/node" "/Users/synapse/.nvm/versions/node/v8.8.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/synapse/Documents/synapsefi-dev-ui/node_modules/watchpack/node_modules/fsevents
gyp ERR! node -v v8.8.0
gyp ERR! node-gyp -v v5.0.3
gyp ERR! not ok
npm WARN synapsefi-dev-ui@2.0.20 No repository field.
npm WARN The package country-data is included as both a dev and production dependency.
npm WARN The package react-dropzone is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules/watchpack/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
停顿:node-gyp重建
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
stall: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
推荐答案
尝试运行命令 npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass
, My问题已通过更改 node-sass 的来源解决.
try running the command npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass
, My problem was fixed by changing the source of node-sass.
这篇关于npm install 并在 node-gyp 重建时失败,使用 ```gyp:未检测到 Xcode 或 CLT 版本!``` 由新的 macos catalina 更新引起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!