Question

I am trying to debug a problem with forever/nodejs, and I get this stacktrace in the error log:

chdir(): Permission denied

events.js:72
    throw er; // Unhandled 'error' event
          ^
Error: spawn EACCES
  at errnoException (child_process.js:980:11)
  at Process.ChildProcess._handle.onexit (child_process.js:771:34)

This looks to me like I should be able to look at line 980 of a file named "child_process.js" to see where the error is thrown. However, I cannot locate such a file on the system even with "find". Am I missing it somehow, or is the stracktrace lying?

Was it helpful?

Solution

It's part of the node.js source. See https://github.com/joyent/node/blob/master/lib/child_process.js. I believe you can also step directly through core node code using node's built-in debugger, or a package such as node-inspector.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top