Skip to content
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

Cannot set correct MSBuild path with VS2019 #146

Open
mattbhenley opened this issue Jan 6, 2021 · 1 comment
Open

Cannot set correct MSBuild path with VS2019 #146

mattbhenley opened this issue Jan 6, 2021 · 1 comment

Comments

@mattbhenley
Copy link

I am receiving this error:
gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\15.0\Bin\MSBuild.exe ENOENT

When I check the path in congif.gypi, I see:
"msbuild_path": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\MSBuild\\15.0\\Bin\\MSBuild.exe"

where it should be:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe

I have tried setting the path with the command npm config set msbuild_path "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\MSBuild.exe"

I also download visual studio build tools. I saw in a previous post where the user suggested this:

`I've just hit this, too. For those who want a temporary workaround, hand-editing the file configure.js in node-gyp appears to work. I changed line 161 from this:

variables['msbuild_path'] = path.join(vsSetup.path, 'MSBuild', '15.0',

to this:

variables['msbuild_path'] = path.join(vsSetup.path, 'MSBuild', 'Current',

then reran:

node-gyp configure`

BUT when I look at my configure. js on line 161 all I see is variables.msbuild_path = vsInfo.msBuild

I continually get this error. Any help is appreciated!

@m4heshd
Copy link

m4heshd commented Jan 21, 2022

Did you manage to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants