未在Windows 8.1上构建的节点软件包 - 缺少Microsoft.Cpp.Default.props [英] Node packages not building on Windows 8.1 - Missing Microsoft.Cpp.Default.props

查看:2878
本文介绍了未在Windows 8.1上构建的节点软件包 - 缺少Microsoft.Cpp.Default.props的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

NPM包不是在Windows 8.1上构建的 - 失败,出现以下错误:

NPM packages are not building on Windows 8.1 - failing with following error,

错误MSB4019:导入的项目C:\ Microsoft .Cpp.Default.props。确认< Import>

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.

我尝试过以下操作,

  • 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

以上都没有工作。

我已经在这个年龄了。有没有人有明确的答案工作?

I've spent ages on this already. Does anyone have a definite answer that works?

推荐答案

所以这是2.47am-搞定了。

So it is 2.47am - figured it out.

虽然 node-gyp网站似乎建议使用Visual Studio 2010或2012 ,而不是在Windows 8.1中,请安装 Windows桌面的Visual Studio Express 2013 此问题

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.

这篇关于未在Windows 8.1上构建的节点软件包 - 缺少Microsoft.Cpp.Default.props的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆