Sepush
Sepush

Reputation: 21

installed VS2019 node-gyp find VS still get an err

I have installed VS2019(include MSBuild)

enter image description here

When I run node-gyp configure --msvs_version=2019 or node-gyp rebuild I will get the following err

gyp info it worked if it ends with ok

gyp info using [email protected] 

gyp info using [email protected] | win32 | x64 

gyp info find Python using Python version 3.7.9 found at "C:\ProgramData\Anaconda3\python.exe" 

gyp ERR! find VS 

gyp ERR! find VS msvs_version not set from command line or npm config 

gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt 

gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details 

gyp ERR! find VS looking for Visual Studio 2015 

gyp ERR! find VS - not found 

gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8 

gyp ERR! find VS  

gyp ERR! find VS ************************************************************** 

gyp ERR! find VS You need to install the latest version of Visual Studio 

gyp ERR! find VS including the "Desktop development with C++" workload. 

gyp ERR! find VS For more information consult the documentation at: 

gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows 

gyp ERR! find VS ************************************************************** 

gyp ERR! find VS 

gyp ERR! configure error 

gyp ERR! stack Error: Could not find any Visual Studio installation to use 

gyp ERR! stack     at VisualStudioFinder.fail 

gyp ERR! node -v v14.9.0

gyp ERR! node-gyp -v v7.1.2

It's like this question someone has asked before (node-gyp configure got "gyp ERR! find VS") but the methods in the question don't work for me. any other methods to solve this?

Upvotes: 1

Views: 810

Answers (1)

Sepush
Sepush

Reputation: 21

I have solved this question. It's due to my environmental variable being polluted. So, Just delete the wrong variable and reinstall dependence, and set the variable.

Upvotes: 1

Related Questions