节点安装时,我可以在哪里找到node.js文件?

问题描述:

我试图从节点删除此消息:节点安装时,我可以在哪里找到node.js文件?

(node) warning: Recursive process.nextTick detected 

,因为没有别的办法。我从Ubuntu的存储库(?我用的是二进制从故宫,但它应该是差不多了,右)下载节点的来源,有一个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); 
} 

我在哪里可以找到这个文件当节点安装为二进制文件?

节点的.js文件被编译为node二进制文件,所以如果你想改变它,你需要检查git回购,修改包含maxTickWarn的文件,然后从源代码编译节点。

+1

+1;很容易用'strings $(which node)|验证fgrep'递归process.nextTick''。 – mklement0

您是否尝试过使用--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)