简体   繁体   English

在Windows 10上的npm安装期间出现node-gyp错误

[英]Error with node-gyp during npm install on Windows 10

I'm getting the following error with node-gyp when I do npm install on Windows 10 using GitBash. 当我使用GitBash在Windows 10上进行npm安装时,我收到了node-gyp的以下错误。 I've tried reinstalling node-gyp again but doesn't help. 我曾尝试重新安装node-gyp,但没有帮助。 Does anyone know how to fix this issue? 有谁知道如何解决这个问题?

$ npm install
npm WARN package.json lms@1.0.0 No description
npm WARN package.json lms@1.0.0 No README data

> libxmljs@0.14.3 install C:\Users\Jason\Desktop\Projects\brainiac\node_modules\js2xml\node_modules\libxmljs
> node-gyp rebuild


C:\Users\Jason\Desktop\Projects\brainiac\node_modules\js2xml\node_modules\libxmljs>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
TRACKER : error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified. [C:\Users\Jason\Desktop\Projects\brainiac\node_modules\js2xml\node_modules\libxmljs\build\vendor\libxml\libxml.vcxproj]


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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276: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:\Users\Jason\Desktop\Projects\brainiac\node_modules\js2xml\node_modules\libxmljs
gyp ERR! node -v v4.4.3
gyp ERR! node-gyp -v v3.3.1
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"
npm ERR! node v4.4.3
npm ERR! npm  v2.15.1
npm ERR! code ELIFECYCLE

npm ERR! libxmljs@0.14.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the libxmljs@0.14.3 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 information on how to open an issue for this project with:
npm ERR!     npm bugs libxmljs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
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:\Users\Jason\Desktop\Projects\brainiac\npm-debug.log

如果您已安装Visual Studio 2015 /其他完整软件包并出现此类错误,则可能有助于从“VS2015 x64 Native Tools命令提示符”运行npm安装,或首先调用“C:\\ Program Files(x86)\\ Microsoft Visual Studio 14.0 \\ VC” \\ vcvarsall.bat”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM