mac: npm install 报错

报错信息 部分

npm ERR! code 1
npm ERR! path /xxx/node_modules/fibers
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info spawn /usr/bin/python2
...... 省略
npm ERR! No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
npm ERR! 
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
npm ERR! 
npm ERR! No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
npm ERR! 
npm ERR! gyp: No Xcode or CLT version detected!
npm ERR! gyp ERR! configure error 

解决办法

指明这些工具的安装路径
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

你可能感兴趣的:(Vue,Mac,bug,vue,npm,install,mac)