m0_60509550
2021-11-25 15:06
采纳率: 0%
浏览 15
已结题

在MAC安装一个NODE项目,安装hiredis时(hiredis相关的gcc\python版本都已安装)提示错误

在MAC安装一个NODE项目,安装hiredis时(hiredis相关的gcc\python版本都已安装),提示以下错误

2 errors generated.
make: *** [Release/obj.target/hiredis/src/reader.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:400:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 17.5.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Applications/XAMPP/xamppfiles/htdocs/zhiwuhui/onlinepay-api/node_modules/hiredis
gyp ERR! node -v v14.17.6
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN co-mocha@1.2.2 requires a peer of mocha@>=1.18 <6 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hiredis@0.5.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hiredis@0.5.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/liuqingyan/.npm/_logs/2021-11-25T06_05_38_173Z-debug.log

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • m0_60509550 2021-11-26 10:45

    node版本的问题,NODE换成了V10.10.0版本后,OK了

    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题