错误C2371:' int8_t' :重新定义,同时安装npm模块

时间:2015-01-05 12:11:17

标签: node.js npm

我正在尝试使用npm install安装npm模块,而这样做我在控制台中收到错误说错误:

node_modules\msgpack\deps\msgpack\msgpack\sysdep.h(24): error C2371: 'int8_t' : redefinition; different basic types

d:\sagews\hermes-hen-scv-android\node_modules\grunt-html-builder\node_modules\msgpack\deps\msgpack\msgpack\sysdep.h(24): error C2371: 'int8_t' : redefinition; different basic types
Project : warning PRJ0018: The following environment variables were not found:
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\SageWS\hermes-hen-scv-android\node_modules\grunt-html-builder\node_modules\msgpack
gyp ERR! node -v v0.10.13
gyp ERR! node-gyp -v v0.10.2
gyp ERR! not ok
unbuild msgpack@0.2.4
unbuild grunt-html-builder@0.5.8

1 个答案:

答案 0 :(得分:0)

这看起来像是在Windows上编译msgpack库的问题。您是否检查了msgpackmsgpack-node的问题跟踪器,看看是否有其他人报告了此错误?

您可以通过执行以下操作来验证msgpack中的错误:

> cd C:\temp
> npm i msgpack

如果失败,那么这不是npm可以修复的问题,而且你必须上游。