You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 19, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 19, 2024. It is now read-only.
Thanks Hugo Wood (@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.
[...]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\prsht.h(607): error C2146: s
yntax error : missing ';' before identifier 'hdr' [C:\Users\Hadrien\Documents\D
ev\bb\node_modules\uwp\build\uwp.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\prsht.h(607): error C4430: m
issing type specifier - int assumed. Note: C++ does not support default-int [C:
\Users\Hadrien\Documents\Dev\bb\node_modules\uwp\build\uwp.vcxproj]
C:\Program Files (x86)\Windows Kits\8.1\Include\um\windows.h(247): warning C419
3: #pragma warning(pop) : no matching '#pragma warning(push)' [C:\Users\Hadrien
\Documents\Dev\bb\node_modules\uwp\build\uwp.vcxproj]
C:\Program Files\NodejsUwp\Console\sdk\deps\chakrashim\include\v8.h(65): fatal
error C1189: #error : Wrong Windows SDK version [C:\Users\Hadrien\Documents\De
v\bb\node_modules\uwp\build\uwp.vcxproj]
[...]
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 tell node-gyp to use the correct kit (if that's actually what's going on here...).
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.
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 nov10.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.
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.
Jianchun Xu (@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.
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.
Activity
munyirik commentedon Mar 2, 2016
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.
munyirik commentedon Mar 2, 2016
Hadrien Jouet (@grownseed) does the the folder C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10586.0 exist on your PC?
grownseed commentedon Mar 2, 2016
Munyiri Kamau (@munyirik) Thank you for looking into this.
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10586.0is indeed present on my PC.Perhaps more interestingly, I found that
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windowscontainsv7.1,v7.1A,v8.0Aandv8.1A, but nov10.0Aversion.In case it is relevant, under
C:\Program Files (x86)\Microsoft SDKs\Windows, I havev7.0A,v7.1A,v8.0,v8.0A,v8.1,v8.1Aandv10.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.
munyirik commentedon Mar 2, 2016
Can you try installing the standalone SDK from here - https://dev.windows.com/en-us/downloads/windows-10-sdk?
grownseed commentedon Mar 2, 2016
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\Windowsfor10.0Aas such:InstallationFolder:C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\ProductName:Microsoft .NET Framework 4.6.1 SDKProductVersion:10.0.10586.0I also found out that for some reason the Node.js (Chakra) command prompt seems to ignore the
GYP_MSVS_VERSIONenvironment variable, so I added--msvs_version=2015tonpm 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-uwpsuccessfully 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.
jianchun commentedon Mar 3, 2016
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? Hadrien Jouet (@grownseed)
grownseed commentedon Mar 3, 2016
Jianchun Xu (@jianchun) I double-checked before trying and I did have
GYP_MSVS_VERSION=2015set,node-gypjust doesn't seem to pick it up in my case. I also triednpm install uwp --msvs_version=2015before 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 thatnode-gypwill 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.
jianchun commentedon Mar 3, 2016
I checked again, I have
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0. I don't have one withoutWOW6432Node.grownseed commentedon Mar 3, 2016
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.