If you're getting the following error:
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node ./scripts/install.js || node-gyp rebuild
npm ERR! info install installing standalone, skipping download.
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS running in VS Command Prompt, installation path is:
npm ERR! gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC"
npm ERR! gyp ERR! find VS - will only use this version
npm ERR! gyp ERR! find VS checking VS2022 (17.7.34003.232) found at:
npm ERR! gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - found VC++ toolset: v143
npm ERR! gyp ERR! find VS - found Windows SDK: 10.0.20348.0
npm ERR! gyp ERR! find VS - does not match this Visual Studio Command Prompt
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - found in "C:\Program Files (x86)\Microsoft Visual Studio 14.0"
npm ERR! gyp ERR! find VS - could not find MSBuild in registry for this version
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
- Install Latest Visual Studio 2022/newer with "C++ Desktop developmnet" workload.
- Open Windows Terminal.
- From dropdown in Tabs select "Developer Command Prompt For VS 2022" (2022 can be higher).
- Run command
set
. - Find
Path
. - Copy whole content of
Path
. - Run command
setx /M path "%path%;C:\your\path\here\"
and put previously copied "Path" content intoC:\your\path\here\
.
Please note that setx command has a character limit of 1024. There are actually a lot of ways to exceed the PATH limit, including using PS1 scripts.