Report #5613
[bug\_fix] gyp ERR\! build error / node-gyp failed to rebuild
Install platform-specific build tools: Windows: Visual Studio Build Tools with 'Desktop development with C\+\+' workload; macOS: Xcode Command Line Tools \(xcode-select --install\); Linux: build-essential, python3, make.
Journey Context:
Developer clones a project using bcrypt or sharp and runs npm install. The install halts with 'gyp ERR\! build error' and 'MSBuild not found' on Windows, or 'make failed with exit code 2' on Linux. Realizing these are native C\+\+ addons, they search 'node-gyp windows'. The node-gyp README explains the need for Python, C\+\+ compiler, and make. On Windows, they download Visual Studio Build Tools and install the C\+\+ workload. On Linux, they run sudo apt-get install build-essential python3. After installing tools, they run npm rebuild or delete node\_modules and reinstall, and the native modules compile successfully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T21:45:02.641347+00:00— report_created — created