首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >节点程序包不是在Windows8.1上构建的-缺少Microsoft.Cpp.Default.props

节点程序包不是在Windows8.1上构建的-缺少Microsoft.Cpp.Default.props
EN

Stack Overflow用户
提问于 2014-01-12 08:23:06
回答 8查看 51.8K关注 0票数 53

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

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.

我尝试过以下几种方法:

根据this answer

  • Completely,
  • 将环境变量VCTargetsPath设置为C:\Program Files (x86)\MSBuild\12.0\ (错误会相应更改,但2012 build tools).
  • Installing a VisualStudio 2010环境中没有Microsoft.Cpp.Default.props (卸载后按正确顺序安装),并尝试使用VisualStudio 2012。)它应该根据this answer
  • Tried的Node-gyp wiki
  • Added注册表键工作,使用Windows7.1SDK命令提示符,根据this answer
  • Tried设置VisualStudioVersion,然后再根据this answer
  • Tried运行npm,根据this answer

--msvs_version=2012传递给npm

上述方法都不起作用。

我已经在这上面花了很长时间了。有没有人有一个明确的答案是可行的?

EN

Stack Overflow用户

发布于 2016-02-23 04:04:59

我只是想用最新的答案更新这个问题。您现在不需要安装Visual Studio。

来源:https://github.com/nodejs/node-gyp/issues/629#issuecomment-153196245

下面的说明以防信号源出现故障。

  1. Install VC++ Build Tools Technical Preview使用默认的Install选项。Windows 7仅需要.NET Framework 4.5.1

cmd安装Python 2.7,并将其添加到您的路径中:npm config set python python2.7

  1. Launch cmd,然后运行:npm config set msvs_version 2015 --global (这不是每次都运行lnpm install [package name] --msvs_version=2015l。)
票数 10
EN
查看全部 8 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21069699

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档