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)MSBuild12.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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…