jcubic
jcubic

Reputation: 66490

Where can I find the node.js file when node is installed?

I've tried to remove this message from node:

  (node) warning: Recursive process.nextTick detected

because nothing else works. I've downloaded the source of node from the Ubuntu repository (I use the binary from npm but it should be almost the same, right?) and there is a node.js file containing this:

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);
}

Where can I find this file when node is installed as a binary?

Upvotes: 0

Views: 121

Answers (2)

ryankeener
ryankeener

Reputation: 59

Have you tried running node with --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)

Upvotes: 2

loganfsmyth
loganfsmyth

Reputation: 161457

Node's .js files are compiled into the node binary, so if you want to change this, you will need to check out the git repo, modify the file containing maxTickWarn and then compile Node from source.

Upvotes: 3

Related Questions