Report #53562
[bug\_fix] gyp ERR\! find Python; gyp ERR\! stack Error: Could not find any Python installation to use \(or on Windows: error MSB4019: The imported project 'C:\\Microsoft.Cpp.Default.props' was not found\)
On Windows: Install 'Visual Studio Build Tools' with the 'Desktop development with C\+\+' workload, install Python 3.x \(checking 'Add to PATH'\), then run \`npm config set msvs\_version 2022\` \(or 2019\). On macOS: Install Xcode Command Line Tools \(\`xcode-select --install\`\). On Linux: Install python3, make, and gcc/g\+\+ \(build-essential\). Then run \`npm rebuild\` or \`npm install --build-from-source\`. The root cause is that native addons require compilation, and node-gyp needs Python and a C\+\+ compiler toolchain.
Journey Context:
Developer clones a project with native dependencies \(sharp, bcrypt, sqlite3\) on a fresh Windows machine or new CI image. Running \`npm install\` fails during the node-gyp rebuild phase complaining Python is missing or Visual Studio build tools aren't found. Developer installs Python from python.org but it still fails because it's not in PATH or not the right version. On Windows, they have Visual Studio Code but not the C\+\+ build tools workload. After installing the full 'Desktop development with C\+\+' workload and setting the msvs\_version config, 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-19T20:23:58.778604+00:00— report_created — created