weixin_40335946
weixin_40335946
2019-03-18 22:06

npm 出现 fatal error C1083: 无法打开包括文件

  • node.js

_canvas@1.6.13@canvas\src\canvas.h(19): fatal error C1083: 无法打开包括文件: “cairo.h”: No such file or directory (编译源文件 ..\src\ImageData.cc)
有没有人给支个招啊

\ [21/22] Installing nan@^2.10.0gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\xiaojian\AppData\Roaming\npm\node_modules\cnpm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "F:\Program Files\nodejs\node.exe" "C:\Users\xiaojian\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\node-gyp-bin\node-gyp.js" "rebuild"
gyp ERR! cwd H:\项目\egg\node_modules_canvas@1.6.13@canvas
gyp ERR! node -v v10.11.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
[npminstall:runscript:error] canvas@^1.6.11 has binding.gyp file, run "node-gyp rebuild" error: Error: Run "C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild" error, exit code 1
× Install fail! Error: Run "C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild" error, exit code 1
Error: Run "C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild" error, exit code 1
at ChildProcess.proc.on.code (C:\Users\xiaojian\AppData\Roaming\npm\node_modules\cnpm\node_modules\runscript\index.js:74:21)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:962:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
npminstall version: 3.20.1
npminstall args: F:\Program Files\nodejs\node.exe C:\Users\xiaojian\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\bin\install.js --fix-bug-versions --china --userconfig=C:\Users\xiaojian.cnpmrc --disturl=https://npm.taobao.org/mirrors/node --registry=https://registry.npm.taobao.org

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

0条回答