Open jianchun opened 8 years ago
The SDK is set in C:\Program Files (x86)\NodejsUwp\Console\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\generator\msvs.py. Looks like it's either a problem in _ConfigWindowsTargetPlatformVersion or the SDK isn't in the registry.
@grownseed does the the folder C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10586.0 exist on your PC?
@munyirik Thank you for looking into this.
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10586.0
is indeed present on my PC.
Perhaps more interestingly, I found that HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows
contains v7.1
, v7.1A
, v8.0A
and v8.1A
, but no v10.0A
version.
In case it is relevant, under C:\Program Files (x86)\Microsoft SDKs\Windows
, I have v7.0A
, v7.1A
, v8.0
, v8.0A
, v8.1
, v8.1A
and v10.0A
.
I tried to repair Visual Studio as well as reinstalling it, to no effect. I also tried running Visual Studio and creating a new project to see if I could install missing dependencies, but again, no luck there.
Please let me know if you need further information.
Can you try installing the standalone SDK from here - https://dev.windows.com/en-us/downloads/windows-10-sdk?
It tells me I need to uninstall my current Windows 10 SDK version.
Instead, I simply added the keys by hand in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows
for 10.0A
as such:
InstallationFolder
: C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\
ProductName
: Microsoft .NET Framework 4.6.1 SDK
ProductVersion
: 10.0.10586.0
I also found out that for some reason the Node.js (Chakra) command prompt seems to ignore the GYP_MSVS_VERSION
environment variable, so I added --msvs_version=2015
to npm install uwp
(I had tried that before having the registry keys in place and that did not work).
I've been able to install node-uwp
successfully and it looks like everything is working now, though I'm still testing.
Thank you for the pointers, hopefully there ends up being a slightly less cumbersome way of making this work.
The registry on my box is actually the same as yours before change. Maybe that's not the problem.
Maybe the key in your fix is --msvs_version=2015
, as we just realized this would happen if the tools picked VS2013.
On my box:
GYP_MSVS_VERSION=2013
, then "npm i" runs into this SDK error.Is there any possibility that you had similar GYP_MSVS_VERSION settings before? @grownseed
@jianchun I double-checked before trying and I did have GYP_MSVS_VERSION=2015
set, node-gyp
just doesn't seem to pick it up in my case. I also tried npm install uwp --msvs_version=2015
before making the changes I mentioned previously and that gave me the same error.
Regarding the registry keys, is it possible that you have them setup under HKEY_CURRENT_USER
? I read somewhere that node-gyp
will pick that up first, but that's a pretty wild guess on my part.
If the registry keys aren't the issue, the only thing I can think of is that creating a new C++ project in Visual Studio somehow fixed something, though I honestly couldn't tell you why, sorry.
I checked again, I have HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0
. I don't have one without WOW6432Node
.
Interesting, I just checked and that key does exist for me too. I'm not sure why it would be picked up in your case and not mine, I'll keep looking around.
Reported by @grownseed in #11
Thanks @hgwood but still no luck... I've removed anything Node-related on my system, installed Node.js with Chakra, re-installed Visual Studio Community 2015 with Visual C++, Visual Studio Extensibility Tools Update 1, Windows 10 SDK, Universal Windows App Development Tools, rebooted, added
GYP_MSVS_VERSION 2015
to my environment variables,npm config set python c:\python2.7\python.exe
.where node
:where npm
:where node-gyp
:Attempting to
npm install uwp
:Of particular note is
Wrong Windows SDK version
, it looks like it's pointing to the Windows 8.1 Kit, even though I do have the Windows 10 Kit available. I'm now stuck trying to figure out how to tellnode-gyp
to use the correct kit (if that's actually what's going on here...).