gyp: No Xcode or CLT version detected!

我的版本信息node :v12.4.0
今天把node升级到12.4.0后,删除modules重新npm时居然报错惹(不过也许不是升级的原因):
gyp: No Xcode or CLT version detected!_第1张图片

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
在这里插入图片描述

gyp: No Xcode or CLT version detected!_第2张图片
成功安装完了依赖,但是目前还没明白xcode-select命令是干哈的
在这里插入图片描述

你可能感兴趣的:(ionic,ionic4,node)