我已尝试从节点中删除此消息:
(node) warning: Recursive process.nextTick detected
因为没有别的办法。我已经从Ubuntu存储库下载了节点源代码(我使用npm中的二进制文件,但它应该几乎相同,对吧?)并且有一个node.js
文件包含:
function maxTickWarn() {
// XXX Remove all this maxTickDepth stuff in 0.11
var msg = '(node) warning: Recursive process.nextTick detected. ' +
'This will break in the next version of node. ' +
'Please use setImmediate for recursive deferral.';
if (process.throwDeprecation)
throw new Error(msg);
else if (process.traceDeprecation)
console.trace(msg);
else
console.error(msg);
}
当节点作为二进制文件安装时,我在哪里可以找到此文件?
答案 0 :(得分:3)
节点的.js
文件被编译成node
二进制文件,因此如果你想更改它,你需要检查git repo,修改包含maxTickWarn
的文件然后从源代码编译节点。
答案 1 :(得分:2)
您是否尝试使用--no-deprecation
运行节点?
Usage: node [options] [ -e script | script.js ] [arguments]
node debug script.js [arguments]
Options:
-v, --version print node's version
-e, --eval script evaluate script
-p, --print evaluate script and print result
-i, --interactive always enter the REPL even if stdin
does not appear to be a terminal
--no-deprecation silence deprecation warnings
--trace-deprecation show stack traces on deprecations
--v8-options print v8 command line options
--max-stack-size=val set max v8 stack size (bytes)