-
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
Breaks with VS2019 installed #1753
Comments
Run into the same problem. |
Mark. |
Running this command seems to fix the issue on my system: |
Thank you so much! We've been pulling hair about this for a long time. |
No, This won't fix mine. |
Set the file "D:\Program Files\NodeJS\node_modules\npm\npmrc" fixed. |
Can confirm this setup works
(set with Using
|
@joaocgreis it seems like 360ddbd should have fixed this is it possible to get a new release cut? |
But, some projects cannot be built with 2019. |
node-gyp v5.0.0 is out with Visual Studio 2019 support. It's not yet integrated into npm so it has to be installed manually. This should do it (only need to be run once): Windows Command Prompt
Powershell
That is, install node-gyp globally and make the npm config variable How to undo this after node-gyp is integrated into npmnpm uninstall --global node-gyp
npm config delete node_gyp
|
Thanks a million joaocgreis. I am using VS 2019, along with node v10.16.2 and npm V 6.9.0. |
npm install --global windows-build-tools |
I believe that will currently install VS 2017 and Python 2.7.17 which might not be desired in this case. |
|
@Pointotech then stop trying to use non-javascript packages that need to be compiled, that's why you're here and Windows is the most difficult platform to be doing this. Clean your dependency tree and keep your catharsis off our issue tracker. |
Changing node version to 10.5.0 resolve this problem. |
Such a low version. I remember that there is a single 2017 complier installer, that means we need not to install the full 2017 and i have not met again this problem. --And btw, this issue is closed. create or find a newer to metion this issue id. |
Finally it worked!!!! |
Hello !I want to use tfjs-examples,but i have trouble!Please help me... |
For me the solution was to uninstall node 12.x and install version 10.21 (11.x might also work) |
Wow you are dense |
For anyone that has not yet (or cannot) updated node on build servers, something like this also seems to work around the issue until you can update node. Basically, you set the vc build environment using vcvarsall.bat from 2017 before running npm install. $VcVarsall = (Get-ChildItem -Path "C:\Program Files (x86)\Microsoft Visual Studio\2017\**\vcvarsall.bat" -Recurse).FullName
cmd /c "`"$VcVarsall`" x64 && npm install" |
Installing MSVS v141 fixed it. |
node-gyp version 4.0.0
I have vs2015, vs2017 and vs2019 installed, I need them for different projects so uninstalling one isn't really an option.
As far as I can tell, if I use msvs_version=2017, the autodetection now finds the setup for 2019 and then fails to construct the correct path for msbuild which is now at
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
instead of
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\15.0\Bin\MSBuild.exe
as node-gyp seems to expect.
Now I'm fine with running the proper 2017 or 2019 and overwriting the msbuild path, doesn't really matter to me, but I can't find how to configure either.
I can apparently overwrite the msbuild path with the command line "--msbuild_path" and thus use vs2019 but the same parameter set globally through "npm config" seems to have no effect.
Any hints?
The text was updated successfully, but these errors were encountered: