Report #10694
[bug\_fix] gyp ERR\! build error
Install platform-specific build tools: Windows: Visual Studio Build Tools with "Desktop development with C\+\+" workload; macOS: Xcode Command Line Tools; Linux: build-essential, python3, make. Or use prebuilt binaries if available.
Journey Context:
You run \`npm install\` on a project using bcrypt for password hashing. The install fails with a wall of red text: "gyp ERR\! build error", "Stack: Error: \`gyp\` failed with exit code: 1", and on Windows "MSB4019: The imported project C:\\Microsoft.Cpp.Default.props was not found". You realize this is a native C\+\+ addon being compiled. You search and find node-gyp requires Python and a C\+\+ compiler. On Windows, you install Python from python.org but it still fails because it needs the Visual C\+\+ compiler, not just any compiler. You must download "Visual Studio Build Tools 2022" and specifically check the "Desktop development with C\+\+" workload which includes MSVC v143 and Windows SDK. On macOS, you run \`xcode-select --install\` to get clang. On Linux, you install \`sudo apt-get install build-essential python3\`. Once these are present, \`npm rebuild\` or deleting node\_modules and reinstalling succeeds because node-gyp can now compile the C\+\+ bindings against the V8 headers included with Node.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:21:11.649151+00:00— report_created — created