Node packages not building on Windows 8.1 - Missing Microsoft.Cpp.Default.props
c++, msbuild, node.js, visual-studio-2010, visual-studio-2012
Solution
So it is 2.47am - figured it out.
Although the node-gyp site seems to suggest using Visual Studio 2010 or 2012, instead for Windows 8.1, install Visual Studio Express 2013 for Windows Desktop as discussed in this issue.
Problem
NPM packages are not building on Windows 8.1 - failing with following error, `error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.` I have tried the following, - Setting an evironment variable `VCTargetsPath` to `C:\Program Files (x86)\MSBuild\12.0\` (The error changes accordingly but there is no `Microsoft.Cpp.Default.props` with the 2012 build tools). - Installing a VisualStudio 2010 environment (uninstalled then installed in the correct order) according to this answer - Completely removed VisualStudio 2010 and tried a VisualStudio 2012 instead, which should work according to the `Node-gyp` wiki - Added registry keys according to this answer - Tried using the Windows 7.1 SDK command prompt according to this answer - Tried setting `VisualStudioVersion` before running npm according to this answer - Tried passing `--msvs_version=2012` to npm according to this answer None of the above have worked. I've spent ages on this already. Does anyone have a definite answer that works?