Report #9474
[bug\_fix] node-gyp ERR\! build error / gyp: No Xcode or CLT version detected
Install platform build tools: macOS: xcode-select --install; Windows: Install Visual Studio Build Tools with 'Desktop development with C\+\+' workload; Linux: sudo apt-get install build-essential python3. For specific packages like node-sass, upgrade to sass \(Dart Sass\) or ensure node-sass version matches your Node version.
Journey Context:
You npm install a package like bcrypt, sharp, or an old version of node-sass. The install fails with verbose C\+\+ compilation errors mentioning 'MSB4019' on Windows or 'clang: error: no such file or directory' on macOS. You see node-gyp errors mentioning missing Python or Visual Studio. You check the node-gyp GitHub repository documentation and realize native addons require a C\+\+ compiler toolchain. On Windows, you download Visual Studio Build Tools and install the C\+\+ workload. On macOS, you run xcode-select --install to get the command line tools. On Linux, you install build-essential. After installing, you delete node\_modules and reinstall, and the native module compiles successfully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T08:16:27.065087+00:00— report_created — created