背景
MAC 安装npm 依赖时报错
kaishen$ npm i heapdump --save-dev
> heapdump@0.3.15 install /node_modules/heapdump
> node-gyp rebuild
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 '/'.
原因
之前安装过一次 xcode commandTool, 后面可能因为升级找不到原来的安装包了。
解决
指明 commandTool的安装路径
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer