Report #9841
[bug\_fix] gyp ERR\! build error: Microsoft Visual C\+\+ 14.0 is required
Install Visual Studio Build Tools 2022 with the 'Desktop development with C\+\+' workload, or on macOS install Xcode Command Line Tools \(xcode-select --install\), ensuring Python 3.x is available in PATH for node-gyp to compile native C\+\+ addons.
Journey Context:
Developer clones a Node.js project using bcrypt, sqlite3, or sharp on a fresh Windows machine, runs npm install, and hits 'gyp ERR\! build error' followed by 'MSB4019: The imported project C:\\Microsoft.Cpp.Default.props was not found'. Attempting to install Python 3 manually doesn't resolve it. Checking the node-gyp README reveals it requires the MSBuild C\+\+ toolset, not just any compiler. Installing Visual Studio Build Tools 2022 with the specific 'Desktop development with C\+\+' workload provides the necessary cl.exe and libraries. Setting npm config set msvs\_version 2022 ensures node-gyp detects the toolchain, allowing the native module to compile against the current Node.js ABI version.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T09:14:33.538365+00:00— report_created — created