gyp: No Xcode or CLT version detected!

我的版本信息node :v12.4.0
今天把node升级到12.4.0后,删除modules重新npm时居然报错惹(不过也许不是升级的原因):
报错截图

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

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/xmm/Documents/miniprogram/CSPUSR/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:200:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.0.0
gyp ERR! command "/usr/local/bin/node" "/Users/xmm/Documents/miniprogram/CSPUSR/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/xmm/Documents/miniprogram/CSPUSR/node_modules/node-sass
gyp ERR! node -v v12.4.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 

百度后,于是输入如下命令
sudo xcode-select --install
在这里插入图片描述

下载xcode 的CLI 工具
成功安装完了依赖,但是目前还没明白xcode-select命令是干哈的
在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ERR! UNCAUGHT EXCEPTION gyp ERR! stack C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-gyp\node_modules\ssri\lib\index.js:16 gyp ERR! stack const getOptString = options => options?.length ? `?${options.join('?')}` : '' gyp ERR! stack ^ gyp ERR! stack gyp ERR! stack SyntaxError: Unexpected token '.' gyp ERR! stack at Object.compileFunction (vm.js:344:18) gyp ERR! stack at wrapSafe (internal/modules/cjs/loader.js:1048:15) gyp ERR! stack at Module._compile (internal/modules/cjs/loader.js:1082:27) gyp ERR! stack at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10) gyp ERR! stack at Module.load (internal/modules/cjs/loader.js:982:32) gyp ERR! stack at Function.Module._load (internal/modules/cjs/loader.js:875:14) gyp ERR! stack at Module.require (internal/modules/cjs/loader.js:1022:19) gyp ERR! stack at require (internal/modules/cjs/helpers.js:72:18) gyp ERR! stack at Object.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\node-gyp\node_modules\make-fetch-happen\lib\cache\policy.js:3:14) gyp ERR! stack at Module._compile (internal/modules/cjs/loader.js:1118:30) gyp ERR! System Windows_NT 10.0.19045 gyp ERR! command "D:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\Administrator\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "install" gyp ERR! cwd D:\www\mer_shop gyp ERR! node -v v13.14.0 gyp ERR! node-gyp -v v9.4.0 gyp ERR! Node-gyp failed to build your package. gyp ERR! Try to update npm and/or node-gyp and if it does not help file an issue with the package author.
最新发布
07-22

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值