-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gyp ERR! find VS - does not match this Visual Studio Command Prompt #2819
Comments
@cclauss what is the solution? |
Windows 11 does not see it even though the sdk is installed. |
I don’t use Windows. Can you make a GitHub Action that fails in this way? If we only had a failing test for everyone to focus on, we could come up with a solution. |
The config set does not work in the new version of npm, I entered the msvs_version value with the help of npm config edit. gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022" |
Try rerunning with |
|
Can you please set both |
In new versions of npm the below command doesn't work anymore so I don't know if it's correct I entered the config file and added it. All of are not working on npm 9.6.2 npm config set msvs-version=2022 npm gives that error when I set. I added both parameters by typing npm config edit, now I'm waiting for the results. --> yarn install --loglevel silly |
You're perfect, your advice worked, I've been researching this error for days, you should write this solution down. But now I'm getting another error :)
|
I solved this error, fixed the msbuild-path and it worked. But it took too long to compile and it failed again. msbuild-path=C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe grpc failed. |
[FOR NPM 9.6.2] NPM VER >= 9
The error is below.
|
Try the answer at the bottom of #2813 -- define the flag |
How should I use this flag, I couldn't find it. yarn install ? |
I would add it to the |
I can not save my changes in npmrc file. How did you manage to add them into that file? |
npm config edit |
@xXAvoraXx I did try that, but when I open the file again all my changes seem not saved. |
Have you tried updating the npm latest version? I guess the npmrc file is referencing it from elsewhere. |
Yes, it is the latest version but still not working. |
try searching for .npmrc files on your computer. |
I also did it and tried to add them manually through notepad. I save it and when I reopen it changes are not done. |
Run the console screen as admin and try again. It's interesting that the changes you make in the npm config don't register. Can you share the error you got here? |
Here are my errors. I did all your recommendations though. Thanks for your support. |
variable name: VCINSTALLDIR
|
same issue, |
I was getting this error when running things in VS Code. |
Same issue with node 18.16.0. |
I had the same issue with @electron |
I am on Windows 10, using only one VS installation (Visual Studio 2022 Community), and the issue still remains. Here is the log: So it is running VS Command Prompt from the installation folder, getting build tools from the same folder, checking VS version from the same folder, and it doesn't match? How is this possible? Don't know if this related, but msvs_version is also configured, running "npm config get msvs_version" returns "2022". Don't know why it can't see it. Any ideas how to fix it? |
% |
@derzhavets is the VCINSTALLDIR env variable set in your shell? Try using Developer Powershell for VS2022, this shell will have all the necessary env set. Give this a try and let me know if it works |
The problem is Values in line 1 and 4 has to match, use the below command Should solve |
If nothing works then check if you have the correct version of node installed as per your OS architecture. |
node-gyp: 9.3.1
npm version
{
npm: '9.6.2',
node: '18.15.0',
v8: '10.2.154.26-node.25',
uv: '1.44.2',
zlib: '1.2.13',
brotli: '1.0.9',
ares: '1.18.1',
modules: '108',
nghttp2: '1.51.0',
napi: '8',
llhttp: '6.0.10',
uvwasi: '0.0.15',
acorn: '8.8.2',
simdutf: '3.1.0',
undici: '5.20.0',
openssl: '3.0.8+quic',
cldr: '42.0',
icu: '72.1',
tz: '2022g',
unicode: '15.0',
ngtcp2: '0.8.1',
nghttp3: '0.7.0'
}
The text was updated successfully, but these errors were encountered: