ERR! install node-gyp failed and return Error Command failed: node-gyp build --jobs max --release
ERR! install gyp info it worked if it ends with ok
ERR! install gyp info using node-gyp@9.1.0
ERR! install gyp info using node@16.16.0 | darwin | arm64
ERR! install gyp ERR! build error
ERR! install gyp ERR! stack Error: You must run node-gyp configure first!
ERR! install gyp ERR! stack at ReadFileContext. (/usr/local/lib/node_modules/node-gyp/lib/build.js:43:20)
ERR! install gyp ERR! stack at ReadFileContext.callback (/usr/local/lib/node_modules/node-gyp/node_modules/graceful-fs/graceful-fs.js:123:16)
ERR! install gyp ERR! stack at FSReqCallback.readFileAfterOpen [as oncomplete] (node:fs:314:13)
我用了9.1.0也不行,然后看提示执行这个命令node-gyp configure 报这个错
gyp: binding.gyp not found (cwd: /Users/liuhong) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:284:16)
gyp ERR! stack at ChildProcess.emit (node:events:527:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 20.4.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/bin/node-gyp" "configure"
gyp ERR! cwd /Users/liuhong
gyp ERR! node -v v16.16.0
gyp ERR! node-gyp -v v9.1.0
gyp ERR! not ok