Unable to run node project on Windows due to node gyp error

56 Views Asked by At

I get this error when attempting to install a node project.

3366 error gyp ERR! find VS msvs_version not set from command line or npm config
3366 error gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
3366 error gyp ERR! find VS checking VS2022 (17.9.34622.214) found at:
3366 error gyp ERR! find VS "D:\Toolbox\DEV\VisualStudio\2022Community"
3366 error gyp ERR! find VS - found "Visual Studio C++ core features"
3366 error gyp ERR! find VS - found VC++ toolset: v143
3366 error gyp ERR! find VS - missing any Windows SDK
3366 error gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
3366 error gyp ERR! find VS looking for Visual Studio 2015
3366 error gyp ERR! find VS - not found
3366 error gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8

I have visual studio community 2022 installed along with the C++ developer workflow and the Windows 11 SDK.

The reported version of [email protected] is, which I assume might be too out of date for the Windows 11 SDK, but I can't seem to force it to use a newer version.

  • I have upgraded the global version of node gyp to 10.0.1
  • I have already followed the instructions at https://github.com/nodejs/node-gyp/blob/main/docs/Updating-npm-bundled-node-gyp.md to upgrade the internal version of node gyp to 10.0.1
  • The package itself does not list node gyp as a dependency, so there's no references in the package itself to node gyp 8.4.1 (I think there might be a dependency of a dependency etc that does?)

I have also attempted to solve the issue by running "npm i -g windows-build-tools", this does not work for me either because of this error: "Error: TypeError: 'process.env' only accepts a configurable, writable, and enumerable data descriptor"

0

There are 0 best solutions below