NPM 包未在 Windows 8.1 上构建 - 失败并出现以下错误,
NPM packages are not building on Windows 8.1 - failing with following error,
error MSB4019:未找到导入的项目C:Microsoft.Cpp.Default.props".确认 <Import> 中的路径.声明是正确的,并且该文件存在于磁盘上.
我尝试了以下方法,
VCTargetsPath
设置为 C:Program Files (x86)MSBuild12.0
(错误相应更改,但没有 Microsoft.Cpp.Default.props
与 2012 构建工具).Node-gyp
wikiVisualStudioVersion
--msvs_version=2012
传递给npm>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).Node-gyp
wikiVisualStudioVersion
before running npm according to this answer--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.47 - 想通了.
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!