mac install npm gyp with error: NPM Error: gyp: No Xcode or CLT version detected!
Run the following command
sudo rm -rf $(xcode-select -print-path) xcode-select --install
node-sass and node-gyp installation fails
Given as follows
... gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 ... npm ERR! node-sass@4.7.2 postinstall: `node scripts/build.js` npm ERR! Exit status 1 ...
node-sass and node-gyp when installed, it will automatically go to foreign source download, and this source is not very stable. Please note that this instability is not all due to the existence of an internal wall caused, because even if you opened the VPN, the problem still occurs.
So the best solution is to use Taobao mirror cnpm:
npm install -g cnpm --registry=https://registry.npm.taobao.org