2013-08-16 53 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可能值得一試。