我的机器上安装了以下软件
Windows 10(64位)
节点4.2.6(64位)
Visual Studio 2013
我正在尝试使用以下命令安装节点包“libxmljs”
npm install libxmljs
但是我得到以下错误
libxml.lib(parser.obj) : error LNK2001: unresolved external symbol snprintf
这是完整的堆栈跟踪
Creating library C:\src\mysourcecode\node_modules\libxmljs\build\Release\xmljs.lib and object C:\src\mysourcecode\node_modules\libxmljs\build\Release\xmljs.exp
libxml.lib(parser.obj) : error LNK2001: unresolved external symbol snprintf [C:\src\mysourcecode\node_modules\libxmljs\build\xmljs.vcxproj]
C:\src\mysourcecode\node_modules\libxmljs\build\Release\xmljs.node : fatal error LNK1120: 1 unresolved externals [C:\src\mysourcecode\node_modules\libxmljs\build\xmljs.vcxproj]
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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\src\mysourcecode\node_modules\libxmljs
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "libxmljs"
npm ERR! node v4.2.6
npm ERR! npm v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! libxmljs@0.17.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the libxmljs@0.17.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the libxmljs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls libxmljs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\src\mysourcecode\npm-debug.log