2014-03-25 134 views
0

我試圖從節點刪除此消息:節點安裝時,我可以在哪裏找到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); 
} 

我在哪裏可以找到這個文件當節點安裝爲二進制文件?

回答

3

節點的.js文件被編譯爲node二進制文件,所以如果你想改變它,你需要檢查git回購,修改包含maxTickWarn的文件,然後從源代碼編譯節點。

+1

+1;很容易用'strings $(which node)|驗證fgrep'遞歸process.nextTick''。 – mklement0

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) 
相關問題