- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
当我运行 npm install
时,我遇到了以下错误。我找不到问题所在。
我需要一些帮助来找到这个问题。
d:\testing\node-sample-module\node_modules\ffi\node_modules\ref\node_modules\nan\nan_implementation_pre_12_inl.h(112): error C2668: 'v8::FunctionTemplate::New' : ambiguous call to overloaded function [d:\TESTING\node-sample-module\node_modules \ffi\node_modules\ref\build\binding.vcxproj]
C:\Users\SELVA\.nw-gyp\0.8.5\deps\v8\include\v8.h(3344): could be 'v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::FunctionCallback,v8::Handle<v8::Value>,v8::Handle<v8::Signature>,int)'
C:\Users\SELVA\.nw-gyp\0.8.5\deps\v8\include\v8.h(3343): or v8::Local<v8::FunctionTemplate> v8::FunctionTemplate::New(v8::InvocationCallback,v8::Handle<v8::Value>,v8::Handle<v8::Signature>,int)' while trying to match the argument list '(int, v8::Local<v8::Value>, v8::Local<v8::Signature>)'
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (c:\Users\SELVA\AppData\Roaming\npm\node_modules\nw-gyp\lib\build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "c:\\Users\\SELVA\\AppData\\Roaming\\npm\\node_modules\\nw-gyp\\bin\\nw-gyp.js" "clean" "configure" "--target=0.8.5" "build" "--arch=ia32"
gyp ERR! cwd d:\TESTING\node-sample-module\node_modules\ffi\node_modules\ref
gyp ERR! node -v v0.10.35
gyp ERR! nw-gyp -v v0.12.4
gyp ERR! not ok
仅供引用,我使用的是 Windows 7 机器。
另外,安装以下:
Visual C++ Redistributable 2013(32 位)
Python 2.7.3(环境变量设置为 path/python.exe)
Visual Studio Express 2013
.Net framework 4.5 SDK
提前致谢。
最佳答案
更新:
现在一个新包将为我们完成所有这些工作。
通过运行确保您有足够的权限:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
然后运行:
npm install -g windows-build-tools
等待它安装然后运行:
窗口构建工具
一切都应该处于最佳状态。
旧答案:
我刚刚遇到了一些与您相同的问题。我在 Hyper-V 中启动了 Windows 8.1 的全新安装,完成了安装过程并记下了很长一段时间的事情。看来您已经安装了所有必要的工具。
我认为你唯一可能遗漏的(虽然不完全确定)可能是在运行 npm install
时设置 msvs_version
- 标志 - 所以试试看看这个帮助:
npm install --msvs_version=2013
既然我已经完成了所有这些笔记,我不妨将它们放在这里,这样遇到同样问题的人可能会得到一些帮助。
我在新安装的机器上的食谱:
1) 安装 Node.js
2) 安装git
选择“从 Windows 命令提示符使用 Git 和可选的 Unix 工具”
3) 将 npm 升级到 npm 3.x.x(可选步骤)
即使您刚刚安装了 Node.js,也并不一定意味着您在版本 3 中安装了 npm。
npm install -g npm-windows-upgrade
。Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm-windows-upgrade
npm --version
并确保它响应类似 3.x.x
4) 安装Python 2.7.x
为所有用户安装
- 点击下一步。选择安装在C:\Python27
- 点击下一步
一定要在Add python.exe to Path
中选择Will be installed on local hard drive
- 点击next
完成安装
5) 安装 Visual Studio Express 2013 for Windows Desktop with Update 4
即使您的系统上安装了另一个版本的 Visual Studio,也要安装它。
English
或其他一些可用的语言,然后单击下载
wdexpress_full.exe
并点击“下一步”现在运行 npm install --msvs_version=2013
,您应该能够在没有 node-gyp 抛出错误的情况下到达终点。
关于python - 吉普错误!堆栈错误 : `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32964144/
我有以下一段 msbuild 代码: C:\DirA\ C:\DirB\ '$(DirA)%(Filename)%(Extension)')">
我有一个 master.proj msbuild 脚本,它使用 MSBuild 任务构建多个项目。 这是一个典型的例子: 但是,我的问题是,如果在命令行上给出更多属性,它们不会传递给 MSB
我编写了一个自定义 MSBuild 任务,将其称为 TaskA,它解析文件并对其进行一些处理。我现在想编写另一个 MSBUild 任务,将其称为 TaskB,它在其中使用 TaskA。我知道我可以像使
我有好几次无法在 csproj 文件 (.NET Core) 中找到有关有效元素的信息。特别是具有 Content 和 Include/Exclude/Update/CopyToPublishDire
鉴于这样的事情.. DB1 Database
我有一个msbuild目标,它具有一个Import标签,如下所示: 在Company.LifeCycle.targets文件的内容中,如何以编程方式获取当前目录(在这种情况下为: C:\Progra
我在MSBuild脚本中创建的项目组的范围设置方面遇到一些问题。基本上,我想要做的是有两个不同的目标-我们将它们称为RunUnitTests和RunIntegrationTests-生成一个名为Tes
我希望下面的代码为 List 和 List2 生成相同的项目(我在搜索路径中有一个 cpp1 项目)。 '..\..\..\projects\**\%(identity).vcx
我正在编写一个 MSBuild 任务来升级数据库(完整源代码 here),遇到了一个我不知道如何处理的错误/设计特征。基本上,如果我声明: public int? TargetVersion {
MSBuild 针对最新目标发出以下消息: Skipping target "MyTarget" because all output files are up-to-date with respec
我正在为 msbuild 编写一个脚本,它应该在一个步骤中制作两批。 示例:2 个项目组 这两个组应该相互循环: 我希望 msbuild 使两个批次的结果都给出 1 A 2
我正在使用构建定义构建项目。执行此操作时,还会执行代码分析。代码分析输出各种文件,包括: ConsoleApplication2.exe.CodeAnalysisLog.xml ConsoleAppl
我正在尝试使用 MSBuild 从文本文件中读取文件列表,然后执行递归复制,将这些目录文件的内容复制到某个暂存区,同时排除某些扩展名(例如 .tmp 文件) 我已经设法使用 CreateItem 和
我有一个MSBuild项目,我希望将当前日期添加到正在创建的zip文件中。 我正在使用MSBuildCommunityTasks。 在网站http://msbuildtasks.tigris.or
我正在将一个 Web 应用程序包从 MSBuild 命令行部署到 IIS6 上的 MSDepSvc,它使用基本身份验证与以下命令一起正常工作: MSBuild.exe Web.csproj /p:
我有以下 MSBuild 脚本: test1;test2;test3 如果我调用不带任何参数的脚本,我会得
对于不是项目文件而是更复杂的构建脚本的 MSBuild 文件是否有标准文件扩展名? 我正在考虑 .msbuild.proj 以避免与其他 .proj 文件(我知道实际上是 MSBuild 文件)混淆。
假设我有两个耗时的目标,并且我想并行执行它们。假设一个目标运行单元测试,另一个目标生成一些文档。我尝试过这种方法: root.targets:
看起来(至少)有两个选项可以让 nant 使用 csproj 文件:使用 NAntContrib 的任务或直接使用 msbuild.exe (例如 codecampserver )。我读得对吗?如果是
如何获取内置 MSBuild 变量的列表? 我需要知道如何确定当前项目的 csproj 名称,并且认为了解我还能在 MSBuild 中找到什么内容可能会很有用。 最佳答案 来自 Microsoft 文
我是一名优秀的程序员,十分优秀!