2013-08-16 54 views
0

如何在我的服务器上找不到此文件?unix ssh使用ssh查找node.js文件

找到。 -name的lib/child_process.js

我知道它的存在,因为我使用它,可以看到一个错误:

net.js:1054 
if (port && handle.getsockname && port != handle.getsockname().port) { 
       ^
TypeError: Cannot read property 'getsockname' of undefined 
at net.js:1054:23 
at Object.1:1 (cluster.js:587:5) 
at handleResponse (cluster.js:171:41) 
at respond (cluster.js:192:5) 
at handleMessage (cluster.js:202:5) 
at process.EventEmitter.emit (events.js:117:20) 
at handleMessage (child_process.js:318:10) 
at child_process.js:387:7 
at process.handleConversion.net.Native.got (child_process.js:91:7) 
at process.<anonymous> (child_process.js:386:13) 

child_process.js:387:7

我想找到并编辑(nano文件名)这个js文件,如果有人知道如何找到/取消隐藏它?

下此修复程序:https://github.com/bnoordhuis/node/commit/1dacde5a7d0c0363e811101d10140133c8245fbe

+1

为什么在你的find命令中使用'lib/foo'?这是不可能找到任何东西的。只需提供文件名。 – Mat

+0

不,它一直在我的facebook-chat nodemodules(dependacies)中找到一个同名的文件 –

+0

而没有其他的东西?难道这就是node.js中的“内置”文件,并且实际上并不存在于文件系统中(“编译” - 在或在某种存档中)? – Mat

回答

0

为了记录在案,issue 5330issue 5774可能会感兴趣。

但是,child_processCore Module,实际上编译为node可执行文件的一部分。

Node has several modules compiled into the binary. [...]

The core modules are defined in node's source in the lib/ folder.

如果你想申请的编辑,你需要的源代码的副本(无论是从GitHubdistribution)打补丁,编译和安装。

节点的Installation Guide可能值得一试。