标签: node-gyp

MSBUILD:错误MSB3428:无法加载Visual C++组件"VCBuild.exe"

我想nodejs从很长一段时间安装.我尝试通过谷歌搜索,但严重的是我没有任何有效的解决方案.

我的第一个问题是

  1. 为什么Nodejs需要Microsoft Visual组件?

其次根据谷歌的建议我尝试下面的事情

  • 安装Visual C++ 2010(变量中的更新路径)但安装后我得到了更多错误,包括"MSBUILD:错误MSB3428:无法加载Visual C++组件"VCBuild.exe".
  • 我们已经完成https://github.com/TooTallNate/node-gyp了删除错误,但仍然无法正常工作.
  • 再次卸载并安装了Node js,但没有成功.

我有以下版本

  • 节点js 0.12
  • Python 2.7
  • Ruby 1.9.3
  • Windows 7 64位.

当我运行时npm-install,错误显示如下

MSBUILD : error MSB3428: Could not load the Visual C++ component 
"VCBuild.exe".To fix this, 1) install the .NET Framework 2.0 SDK, 2) 
install Microsoft Visual Studio 2005 or 3) add the location of the 
component to the system path if it is installed elsewhere. 
Run Code Online (Sandbox Code Playgroud)

package.json的如下:

{
 "name": "TRest",
 "version": …
Run Code Online (Sandbox Code Playgroud)

ruby python msbuild node.js node-gyp

18
推荐指数
3
解决办法
2万
查看次数

npm安装错误:"无法找到v120的构建工具(Platform Toolset ='v120')"

运行npm install需要node-gyp重建的时,会抛出以下构建错误:

MSB8020:找不到v120(Platform Toolset ='v120')的构建工具.要使用v120构建工具进行构建,请安装v120构建工具.或者,您可以通过选择"项目"菜单或右键单击解决方案,然后选择"重新定位解决方案"来升级到当前的Visual Studio工具.

系统信息

  • Windows 10(x64)
  • Visual Studio 2015
  • 节点v0.12.7
  • npm v2.11.3
  • node-gyp v2.0.1

msbuild npm node-gyp windows-10 visual-studio-2015

18
推荐指数
1
解决办法
2万
查看次数

使用node-gyp进行NPM安装失败

我们在项目中运行"npm install"时遇到问题.无法找到某个文件:

fatal error C1083: Cannot open include file: 'windows.h'
Run Code Online (Sandbox Code Playgroud)

它似乎来自node-gyp模块:

c:\ Program Files \nodejs \node_modules \npm \node_modules \node-gyp\src\win_delay_lo ad_hook.c(13):

致命错误C1083:无法打开包含文件:'windows.h':没有文件或目录[D:\ngs-frontend-next \node_modules\browser-sync \node_module s\socket.io \node_modules\engine.io \node_modules\ws \node_modules\bufferutil\buil \\ binding.sln]

这个节点gyp似乎是我们痛苦的永无止境的源头.起初它抱怨它需要python,所以我们安装了它.然后它抱怨它需要VCBuild,我们安装(使用.NET 2.0 SDK),现在我们有这个错误.这几乎就像错误变得越来越模糊,感觉就像我们走错了道路一样.

奇怪的是,我们团队中的其他人在运行npm-install时没有任何问题.

完整错误如下所示:

c:\ Program Files \nodejs \node_modules \npm \node_modules \node-gyp\src\win_delay_lo ad_hook.c(13):

致命错误C1083:无法打开包含文件:'windows.h':没有文件或目录[D:\ngs-frontend-next \node_modules\browser-sync \node_module s\socket.io \node_modules\engine.io \node_modules\ws \node_modules\bufferutil\buil \\ binding.sln]

gyp ERR!构建错误gyp ERR!堆栈错误: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe退出代码失败:ChildProcess.onExit上的1个堆栈(C:\ Program Files \nodejs \node_modules \npm \node _modules \node-gyp\lib\build.js:270:23)gyp ERR!堆栈在emitTwo(events.js:87:13)gyp ERR!堆栈在ChildProcess.emit(events.js:172:7)gyp ERR!Process.ChildProcess._handle.onexit(internal/child_proces s.js:200:12)gyp ERR!系统Windows_NT 6.1.7601 gyp ERR!命令"C:\ Program Files \nodejs …

javascript node.js npm node-gyp

18
推荐指数
5
解决办法
5万
查看次数

如何让node-gyp在Windows 7平台上运行

在尝试编译标准的"Hello World"示例[2]时,我尝试在Windows 7 + Node.js平台上使用node-gyp失败[3].注意:当尝试npm install contextifyw或没有"-g"时,node-gyp以类似的方式失败[3] ,因此这些可能是相关的问题.

组态:

  • node-gyp 0.12.2
  • Windows 7 x64 SP1
  • Python 2.7
  • Node.js 0.10.24
  • Visual Studio 2010 per [1](也尝试过2012)
  • 每个[1] VS SDK 7.1(尝试过32位和64位版本)
  • 从标准Windows命令提示符或SDK7.1 cmd提示符运行node-gyp

参考文献:
[1] https://github.com/TooTallNate/node-gyp/wiki/Visual-Studio-2010-Setup

[2] https://github.com/joyent/node/tree/master/test/addons/hello-world

[3]"hello world"[2]项目中的"node-gyp rebuild"产生以下2个错误:

.... node-gyp\0.10.24\deps\uv\include\win.h(8738):错误C2371:'SYSTEM_POWER_STATUS':重新定义; 不同的基本类型[...\build\test.vcxproj]

.... node-gyp\0.10.24\deps\uv\include\mswsock.h(27):致命错误C 1083:无法打开包含文件:'_mingw.h':没有这样的文件或目录[... \编译\ test.vcxproj]

以及2个警告:

.... node-gyp\0.10.24\deps\uv\include\win.h(13513):警告C4005:'UNALIGNED':宏重新定义[...\build\test.vcxproj]

.... node-gyp\0.10.24\deps\uv\include\mswsock.h(26):警告C4068:未知的编译指示[...\build\test.vcxproj]

完整的跟踪如下:

C:\sigma\node_modules\x>node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@0.12.2
gyp info using node@0.10.24 | win32 | x64
gyp info spawn …
Run Code Online (Sandbox Code Playgroud)

windows visual-studio-2010 node.js node-gyp contextify

16
推荐指数
1
解决办法
2万
查看次数

npm install mongoose causes gyp and kerberos errors (gssapi/gssapi.h file not found)

Ubuntu 14.04

nodejs version is v4.1.1 installed with these commands:

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
Run Code Online (Sandbox Code Playgroud)

mongodb installed via mongodb docs tutorial

Next I tried installing mongoose by doing

sudo npm install mongoose
Run Code Online (Sandbox Code Playgroud)

I received the following error:

> kerberos@0.0.14 install /root/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos
> (node-gyp rebuild) || (exit 0)

gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack     at F (/usr/lib/node_modules/npm/node_modules/which/which.js:73:28)
gyp ERR! stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:76:29)
gyp ERR! …
Run Code Online (Sandbox Code Playgroud)

ubuntu kerberos mongoose node.js node-gyp

16
推荐指数
1
解决办法
9460
查看次数

为什么在Mac OSX El Capitan上node-gyp重建失败

我最近买了一台Mac,它使用Mac OSX El Capitan v10.11.4.使用自制软件安装节点,并使用节点v6.2.2和npm v3.9.5.我在使用bcrypt时遇到错误npm install,我认为这是由node-gyp rebuild错误引起的.我最近也下载了xcode-select(版本2343)和xcode(7.3.1)(按此顺序).

这是我运行后的完整错误输出npm install:

https://gist.github.com/varunjayaraman/5734af617d616437cd5b3456b20bc503

不确定出了什么问题.我来自linux的土地,并且确实对自己不从源代码安装保持警惕,所以也许这就是导致这些问题的原因?无论如何,任何建议都会受到超级赞赏.我也看到这个错误在其他人身上涌现,但他们的解决方案似乎都没有用(当我输入时xcode-select --print-path,我得到了/Applications/Xcode.app/Contents/Developer)

node.js node-gyp osx-elcapitan

16
推荐指数
2
解决办法
2万
查看次数

错误:找不到指定的模块

我正在尝试使用edge.js来执行一些.NET代码,以便在Electron应用程序的Windows上打印.我已经尝试了电子边缘,我也尝试按照Electron文档中说明手动构建针对Electron的edge.js模块,但是当我尝试在打包的应用程序中使用edge时,我不断收到以下错误:

Error: The specified module could not be found.
\\?\C:\path\to\app\app-1.0.0\resources\app.asar.unpacked\node_modules\edge\lib\native\win32\x64\6.5.0\edge_nativeclr.node
    at Error (native)
    at process.module.(anonymous function) (ELECTRON_ASAR.js:178:20)
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:178:20)
    at Object.Module._extensions..node (module.js:583:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:192:18)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
Run Code Online (Sandbox Code Playgroud)

我已经检查了文件系统edge_nativeclr.node,事实上,模块确实存在.我的怀疑是我不知道是不是正确构建模块,它可能仍然针对节点的错误版本,因此电子无法导入模块.

我尝试了几种不同的方法,包括按照电子边缘的步骤手动更新build.bat并将--target=1.4.12 --dist-url=https://atom.io/download/atom-shell标志添加到node-gyp configure build.

我还在我的设置中设置了以下npm配置选项.npmrc:

target=1.4.12
arch=x64
target_arch=x64
disturl=https://atom.io/download/electron
runtime=electron
build_from_source=true
msvs_version=2015
Run Code Online (Sandbox Code Playgroud)

并运行 …

node.js node-gyp electron edgejs

16
推荐指数
1
解决办法
9661
查看次数

我应该备份".npm"和".node-gyp"文件夹吗?

我正在为我的硬盘驱动器制定备份计划,我想知道是否需要备份隐藏文件夹"〜/ .npm"和"〜/ .node-gyp"?或者它们只是临时文件夹,其内容是自动构建的?

backup node.js npm node-gyp

15
推荐指数
1
解决办法
5993
查看次数

如何在Windows 10上解决'node-gyp rebuild'问题?

作为尝试在项目中使用节点NPM依赖项的一部分,我遇到了一个node-gyp rebuild问题,我已经报告过了.

我知道这个SO问题的解决方案,但它不适用于Windows 10(我是32位,我不知道这是否相关).Windows SDK 7.1(和其他)将无法安装.

有没有人有Windows 10的运营解决方案?

UDPATE

尝试后npm install <module name> --msvs_version=2013,我收到一条新的错误消息:

在此输入图像描述

javascript node.js npm node-gyp windows-10

15
推荐指数
3
解决办法
1万
查看次数

npm ERR!: 代码 127.gyp ERR! 堆栈错误:命令失败

我在执行时遇到以下错误npm install

$ npm install
npm ERR! code 127
npm ERR! path /home/jesusjimenez/projects/project/node_modules/fibers
npm ERR! command failed
npm ERR! command sh -c node build.js || nodejs build.js
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@3.8.0
npm ERR! gyp info using node@15.12.0 | linux | x64
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: Command failed: /usr/bin/python3 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
npm ERR! …
Run Code Online (Sandbox Code Playgroud)

npm node-gyp node-modules npm-install

15
推荐指数
1
解决办法
4万
查看次数