尝试安装节点模块时出现node-gyp错误

时间:2017-05-08 18:03:25

标签: node.js npm node-gyp

我的环境是Windows 10,我在cygwin工作。

尝试npm install ldapauth时,我得到了:

gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\ctote\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:285:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ctote\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\webdev\ldap\node_modules\buffertools
gyp ERR! node -v v7.4.0
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok
npm WARN ldap@1.0.0 No description
npm WARN ldap@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! buffertools@1.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1

我最近安装了$ npm install --global --production windows-build-tools,但在此之前我遇到了一些奇怪的错误。我不知道该尝试什么,或者在哪里寻找这些。下面是编译错误的一个较大的部分,但它看起来像基于一些混乱的库或其他东西的一般语法错误?:

..\buffertools.cc(19): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\webdev\ldap\node_modules\buffertools\build\buffertools.vcxproj]
  ..\buffertools.cc(32): note: see reference to class template instantiation '`anonymous-namespace'::UnaryAction<Derived>' being compiled
..\buffertools.cc(19): error C2143: syntax error: missing ',' before '&' [D:\webdev\ldap\node_modules\buffertools\build\buffertools.vcxproj]
..\buffertools.cc(21): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\webdev\ldap\node_modules\buffertools\build\buffertools.vcxproj]
..\buffertools.cc(21): error C2143: syntax error: missing ',' before '&' [D:\webdev\ldap\node_modules\buffertools\build\buffertools.vcxproj]
..\buffertools.cc(35): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int [D:\webdev\ldap\node_modules\buffertools\build\buffertools.vcxproj]
  ..\buffertools.cc(60): note: see reference to class template instantiation '`anonymous-namespace'::BinaryAction<Derived>' being compiled
..\buffertools.cc(35): error C2143: syntax error: missing ',' before '&' [D:\webdev\ldap\node_modules\buffertools\build\buffertools.vcxproj]

0 个答案:

没有答案