node-gyp: Cannot install on Windows 10 (cannot find WindowsSDKDir variable from the registry)

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Cou ld not find WindowsSDKDir variable from the registry.  TargetFrameworkVersion or PlatformToolset may be set to  an invalid version number. [*******************]
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. 

Has anybody else got this working? I’ve installed Visual Studio 2015

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 21 (8 by maintainers)

Most upvoted comments

Got this working on windows 10 & node js v4 & visual studio community 2015. As @No9 stated, you need to launch Visual studio, then do: file > new > project, in the window that opened, select “Model > Visual C++” and in the middle of the window you should see a button “install microsoft C++” or something like that, click on it and it will launch the install process for the C++ & Microsoft SDK. Once that’s done it will work as expected !

@ocombe Yeah, that worked me! I had to go to File -> New Project -> Templates, then click on the Visual C++ list item, then in the main area of the dialogue box I saw Install Visual C++ 2015 Tools for Windows Desktop. After doing that my npm install worked. It was sha3 that was causing the problem. I’m surprised I haven’t broken one of my monitors by now.