上的“node gyp rebuild”出错`base64@2.1.0安装`



在MAC上运行"sudo npm install",我在base64@2.1.0 install上得到了关于node-gyp rebuild的错误。有什么办法解决这个问题吗?请帮忙。

gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 69
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jepeng/Documents/huron/wx2-admin-web-client/node_modules/base64
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 
npm ERR! base64@2.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the base64@2.1.0 install script.
npm ERR! This is most likely a problem with the base64 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 base64
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/jepeng/Documents/huron/wx2-admin-web-client
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

我已经通过使用节点v0.10.40 的旧版本解决了这个问题

我也面临类似的问题。遵循以下步骤在MacOS highSierra 10.13上修复它:

  1. 下载xcode的命令行工具(MacOS 10.13)并安装。从"https://developer.apple.com/download/more/"
  2. 已从应用商店安装xcode 10.0。打开xcode并执行xcode在初始启动时所做的常规配置
  3. 在此之后,它开始给出"xcode select"路径问题,如上面的描述所述。在运行命令"xcode select--print path"时,它将路径显示为"/Library/Developer/CommandLineTools",所以我继续尝试"xcode select--reset",之后路径更改为"/Applications/xcode.app/Contents/Developer"。之后,构建立即开始工作,没有任何问题

最新更新