2011-12-05 36 views
1

从命令行console.trace()的输出,输入console.trace()会吐出:了解节点

at repl:1:10 
at REPLServer.eval (repl.js:80:21) 
at Interface.<anonymous> (repl.js:182:12) 
at Interface.emit (events.js:67:17) 
at Interface._onLine (readline.js:162:10) 
at Interface._line (readline.js:426:8) 
at Interface._ttyWrite (readline.js:603:14) 
at ReadStream.<anonymous> (readline.js:82:12) 
at ReadStream.emit (events.js:88:20) 
at ReadStream._emitKey (tty.js:309:10) 

有人能迅速走在我低谷这个烂摊子?

回答

2

这是来自您当前堆栈的打印。显然你从eval()repl.js (line 80, column 20)中调用的某个脚本调用了console.trace()repl.js line 182调用了这个脚本,events.js (line 67)等调用了这个脚本。你必须自上而下读取它。

+0

谢谢。第一行是什么:'at repl:1:10'? – Randomblue

+0

repl是您调用'eval'的JavaScript文件的名称。因此,node.js中的新范围将被命名为您正在评估的文件。这可能是你的eval脚本的第一行,第10行抛出异常,但这些结果可能是不可预知的,所以它可能是其他地方。 –