尝试全局安装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
damphat.. 7
npm
工具在QNAP OS中无法正常工作
该变通告诉npm
那威联通不支持获取或通过修改设置用户ID npm
代码:
在编辑器中打开文件uid-number.js:
/share/MD0_DATA/.qpkg/Optware/lib/node_modules/npm/node_modules/uid-number/uid-??number.js
转到第11行并替换uidSupport = process.getuid && process.setuid
为uidSupport = false
npm
工具在QNAP OS中无法正常工作
该变通告诉npm
那威联通不支持获取或通过修改设置用户ID npm
代码:
在编辑器中打开文件uid-number.js:
/share/MD0_DATA/.qpkg/Optware/lib/node_modules/npm/node_modules/uid-number/uid-??number.js
转到第11行并替换uidSupport = process.getuid && process.setuid
为uidSupport = false