Where is child_process.js?

邮差的信 提交于 2019-12-10 08:09:17

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/22973116/where-is-child-process-js

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!