如何使用npm审核修复程序修复节点gyp错误

如何使用npm审核修复程序修复节点gyp错误,npm,Npm,我在运行npm审核修复程序时遇到问题。 我想将node.js从v0.10.32更新到v10 环境 OS:CentOS release 6.10 (Final) Node.js:v0.10.32 套餐 name Current Wanted Latest Location config 1.2.1 1.2.1 3.2.5 NodeServer forever 0.11.1 0.11.1 2.0.0 NodeServer l

我在运行npm审核修复程序时遇到问题。
我想将node.js从v0.10.32更新到v10

环境

OS:CentOS release 6.10 (Final)
Node.js:v0.10.32
套餐

name        Current  Wanted  Latest  Location
config           1.2.1   1.2.1   3.2.5  NodeServer
forever         0.11.1  0.11.1   2.0.0  NodeServer
log4js          0.6.20  0.6.20   6.1.0  NodeServer
log4js-extend    0.1.2   0.1.2   0.2.1  NodeServer
opts             1.2.2   1.2.2   1.2.7  NodeServer
socket.io        1.3.6   1.3.6   2.3.0  NodeServer
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/root/.nvm/versions/node/v10.18.1/lib/node_modules/npm/node_modules/node-    gyp/lib/build.js:191:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.9.184-linuxkit
gyp ERR! command "/root/.nvm/versions/node/v10.18.1/bin/node" "/root/.nvm/versions/node/v10.18.1/lib/node_modules/np    m/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/html/testserver/node.js/node_modules/utf-8-validate
gyp ERR! node -v v10.18.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bufferutil@1.1.0 (node_modules/bufferutil):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bufferutil@1.1.0 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: utf-8-validate@1.1.0 (node_modules/utf-8-validate):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: utf-8-validate@1.1.0 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
up to date in 2.31s
fixed 0 of 60 vulnerabilities in 503 scanned packages
  17 vulnerabilities required manual review and could not be updated
  3 package updates for 43 vulnerabilities involved breaking changes
  (use `npm audit fix --force` to install breaking changes; or refer to `npm audit` for steps to fix these manually)
这是我的错误消息

name        Current  Wanted  Latest  Location
config           1.2.1   1.2.1   3.2.5  NodeServer
forever         0.11.1  0.11.1   2.0.0  NodeServer
log4js          0.6.20  0.6.20   6.1.0  NodeServer
log4js-extend    0.1.2   0.1.2   0.2.1  NodeServer
opts             1.2.2   1.2.2   1.2.7  NodeServer
socket.io        1.3.6   1.3.6   2.3.0  NodeServer
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/root/.nvm/versions/node/v10.18.1/lib/node_modules/npm/node_modules/node-    gyp/lib/build.js:191:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 4.9.184-linuxkit
gyp ERR! command "/root/.nvm/versions/node/v10.18.1/bin/node" "/root/.nvm/versions/node/v10.18.1/lib/node_modules/np    m/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/www/html/testserver/node.js/node_modules/utf-8-validate
gyp ERR! node -v v10.18.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bufferutil@1.1.0 (node_modules/bufferutil):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bufferutil@1.1.0 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: utf-8-validate@1.1.0 (node_modules/utf-8-validate):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: utf-8-validate@1.1.0 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
up to date in 2.31s
fixed 0 of 60 vulnerabilities in 503 scanned packages
  17 vulnerabilities required manual review and could not be updated
  3 package updates for 43 vulnerabilities involved breaking changes
  (use `npm audit fix --force` to install breaking changes; or refer to `npm audit` for steps to fix these manually)
我尝试删除node_模块dir和npm install,但到目前为止没有发现任何有用的结果。

请帮我解决我的问题。谢谢,然后转到文件中的行号,即 root/.nvm/versions/node/v10.18.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js

并评论这句话