Report #76323
[bug\_fix] gyp ERR\! build error / node-gyp rebuild failed
Install platform build tools: windows-build-tools/Visual Studio Build Tools on Windows \(with python and C\+\+ workload\), or build-essential \(gcc/make\) and python3 on Linux. For Alpine Linux, need python3, make, g\+\+, and linux-headers. Root cause: Native addons require compiling C\+\+ code against Node's V8 headers via node-gyp.
Journey Context:
You run npm install on a project using bcrypt or sqlite3 on a fresh Windows laptop. The install crashes with 'gyp ERR\! find VS could not find a version of Visual Studio 2017 or newer'. You install Python 3.10 manually but it still fails. You realize you need the Visual C\+\+ build tools. After installing 'Visual Studio Build Tools 2022' with the 'Desktop development with C\+\+' workload, and ensuring Python 3 is in PATH, node-gyp successfully rebuilds the native modules. On Linux containers, you trace similar failures to missing python3-dev or build-essential, fixing it with apt-get install.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T10:41:54.014542+00:00— report_created — created