安装后会有报错
Closed this issue · 6 comments
johnnychq commented
[root@test-1-4 agentx]# cnpm install agentx -g
SyntaxError: Unexpected token N in JSON at position 19
at Object.parse (native)
at /root/.tnvm/versions/alinode/v2.1.2/lib/node_modules/npm/node_modules/uid-number/uid-number.js:43:18
at ChildProcess.exithandler (child_process.js:195:7)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:886:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
非 -g 全局安装无影响,切换为npm,同样问题
[root@test-1-4 agentx]# npm install agentx -g
SyntaxError: Unexpected token N in JSON at position 19
at Object.parse (native)
at /root/.tnvm/versions/alinode/v2.1.2/lib/node_modules/npm/node_modules/uid-number/uid-number.js:43:18
at ChildProcess.exithandler (child_process.js:195:7)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:886:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
安装其他全局模块也失败了
[root@test-1-4 agentx]# cnpm install -g pm2
SyntaxError: Unexpected token N in JSON at position 19
at Object.parse (native)
at /root/.tnvm/versions/alinode/v2.1.2/lib/node_modules/npm/node_modules/uid-number/uid-number.js:43:18
at ChildProcess.exithandler (child_process.js:195:7)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:886:16)
at Socket.<anonymous> (internal/child_process.js:342:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:501:12)
johnnychq commented
zhangzifa commented
@JohnnyChen ENABLE_NODE_LOG=NO cnpm install agentx -g
这样安装一下先。
johnnychq commented
@zhangzifa 嗯,可以了,以后全局安装都需要临时处理?算bug吗
另外,请教一下,因为tnvm调用了自己依赖的npm,会影响cnpm, 包括lnpm(自己私有镜像库)的操作吗
zhangzifa commented
后面会把这个地方改到stderr,如果其它模块会被stderr破坏的话也可能有问题。如果使用了alinode,但是配置了一个不可用的log目录,是一定要提示一下的。
JacksonTian commented
把全局的 ENABLE_NODE_LOG=YES 去掉,需要监控的进程才使用这个变量把。
joyeecheung commented
alinode v2.2.0 开始将提示改为输出到了 stderr,应该不会干扰了。