Error: setuid user id does not exist

Error: setuid user id does not exist

[root@TNAS waque2yuque]# npm i -g waque
Error: setuid user id does not exist
at /mnt/md0/application/nodejs/lib/node_modules/npm/node_modules/uid-number/uid-number.js:49:16
at ChildProcess.exithandler (child_process.js:285:7)
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)
TypeError: Cannot read property 'get' of undefined
at errorHandler (/mnt/md0/application/nodejs/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
at /mnt/md0/application/nodejs/lib/node_modules/npm/bin/npm-cli.js:78:20
at cb (/mnt/md0/application/nodejs/lib/node_modules/npm/lib/npm.js:228:22)
at /mnt/md0/application/nodejs/lib/node_modules/npm/lib/npm.js:266:24
at /mnt/md0/application/nodejs/lib/node_modules/npm/lib/config/core.js:83:7
at Array.forEach (<anonymous>)
at /mnt/md0/application/nodejs/lib/node_modules/npm/lib/config/core.js:82:13
at f (/mnt/md0/application/nodejs/lib/node_modules/npm/node_modules/once/once.js:25:25)
at afterExtras (/mnt/md0/application/nodejs/lib/node_modules/npm/lib/config/core.js:173:20)
at Conf.<anonymous> (/mnt/md0/application/nodejs/lib/node_modules/npm/lib/config/core.js:231:22)
/mnt/md0/application/nodejs/lib/node_modules/npm/lib/utils/error-handler.js:205
if (npm.config.get('json')) {
^

TypeError: Cannot read property 'get' of undefined
at process.errorHandler (/mnt/md0/application/nodejs/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
at process.emit (events.js:182:13)
at process._fatalException (internal/bootstrap/node.js:493:27)
[root@TNAS-LAN waque2yuque]# npm i -g waque
Error: setuid user id does not exist
at /mnt/md0/application/nodejs/lib/node_modules/npm/node_modules/uid-number/uid-number.js:49:16
at ChildProcess.exithandler (child_process.js:285:7)
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)
TypeError: Cannot read property 'get' of undefined
at errorHandler (/mnt/md0/application/nodejs/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
at /mnt/md0/application/nodejs/lib/node_modules/npm/bin/npm-cli.js:78:20
at cb (/mnt/md0/application/nodejs/lib/node_modules/npm/lib/npm.js:228:22)
at /mnt/md0/application/nodejs/lib/node_modules/npm/lib/npm.js:266:24
at /mnt/md0/application/nodejs/lib/node_modules/npm/lib/config/core.js:83:7
at Array.forEach (<anonymous>)
at /mnt/md0/application/nodejs/lib/node_modules/npm/lib/config/core.js:82:13
at f (/mnt/md0/application/nodejs/lib/node_modules/npm/node_modules/once/once.js:25:25)
at afterExtras (/mnt/md0/application/nodejs/lib/node_modules/npm/lib/config/core.js:173:20)
at Conf.<anonymous> (/mnt/md0/application/nodejs/lib/node_modules/npm/lib/config/core.js:231:22)
/mnt/md0/application/nodejs/lib/node_modules/npm/lib/utils/error-handler.js:205
if (npm.config.get('json')) {
^

TypeError: Cannot read property 'get' of undefined
at process.errorHandler (/mnt/md0/application/nodejs/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
at process.emit (events.js:182:13)
at process._fatalException (internal/bootstrap/node.js:493:27)

解决

Work around for this issue:

Open the file below in your editor:

/usr/local/lib/node_modules/npm/node_modules/uid-number/uid-number.js

Goto line 11, then replace uidSupport = process.getuid && process.setuid with uidSupport = false

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容