gpt4 book ai didi

使用-g安装插件时node.js npm错误

转载 作者:搜寻专家 更新时间:2023-11-01 00:11:13 24 4
gpt4 key购买 nike

尝试全局安装 express 并收到此错误。我在我的 x86 qnap 上运行 node.js 版本 0.10.24。

[/share/Qweb/Codiad/workspace/chat] # npm install express -g
npm ERR! Error: setuid user id does not exist
npm ERR! at /share/MD0_DATA/.qpkg/Optware/lib/node_modules/npm/node_modules/uid-number/uid-number.js:44:16
npm ERR! at ChildProcess.exithandler (child_process.js:635:7)
npm ERR! at ChildProcess.EventEmitter.emit (events.js:98:17)
npm ERR! at maybeClose (child_process.js:735:16)
npm ERR! at Socket. (child_process.js:948:11)
npm ERR! at Socket.EventEmitter.emit (events.js:95:17)
npm ERR! at Pipe.close (net.js:466:12)
npm ERR! If you need help, you may report this entire log,
npm ERR! including the npm and node versions, at:
npm ERR! http://github.com/isaacs/npm/issues

npm ERR! System Linux 3.4.6
npm ERR! command "/opt/bin/node" "/opt/bin/npm" "install" "express" "-g"
npm ERR! cwd /share/MD0_DATA/Qweb/Codiad/workspace/chat
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /share/MD0_DATA/Qweb/Codiad/workspace/chat/npm-debug.log
npm ERR! not ok code 0

最佳答案

npm 工具在 QNAP OS 中无法正常工作

work-around 告诉 npm QNAP 不支持通过修改 npm 源代码获取或设置用户 ID:

打开文件 uid-number.js在你的编辑器中:

/share/MD0_DATA/.qpkg/Optware/lib/node_modules/npm/node_modules/uid-number/uid-‌ number.js

转到 line 11并将 uidSupport = process.getuid && process.setuid 替换为 uidSupport = false

关于使用-g安装插件时node.js npm错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21114398/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com