2015-02-24 76 views
1

命令跑:節點檢查啓動失敗

$ node-debug --web-port=8090 myfile.js 

這回以下:

Node Inspector is now available from http://127.0.0.1:8090/debug?port=5858 Debugging myfile.js

debugger listening on port 5858 Command failed: [971:971:0223/200200:ERROR:browser_main_loop.cc(210)] Gtk: cannot open display: :0 Error: cannot open display: :0 /usr/bin/xdg-open: 461: /usr/bin/xdg-open: mozilla: not found /usr/bin/xdg-open: 461: /usr/bin/xdg-open: epiphany: not found /usr/bin/xdg-open: 461: /usr/bin/xdg-open: konqueror: not found /usr/bin/xdg-open: 461: /usr/bin/xdg-open: chromium-browser: not found [1005:1005:0223/200201:ERROR:browser_main_loop.cc(210)] Gtk: cannot open display: :0 /usr/bin/xdg-open: 461: /usr/bin/xdg-open: links2: not found /usr/bin/xdg-open: 461: /usr/bin/xdg-open: links: not found /usr/bin/xdg-open: 461: /usr/bin/xdg-open: lynx: not found /usr/bin/xdg-open: 461: /usr/bin/xdg-open: w3m: not found xdg-open: no method available for opening ' http://127.0.0.1:8090/debug?port=5858 ' Please open the URL manually in Chrome/Chromium/Opera or similar browser

訪問http://127.0.0.1:8090/debug?port=5858,但是,退貨, 「連接被拒絕」 的錯誤。

回答

1

您可以添加-c選項,以防止node-debug從打開瀏覽器:

$ node-debug -c --web-port 8090 myfile.js 

IIRC node-debug從檢查後端丟棄錯誤消息。您可以嘗試手動運行後端以驗證它是否正確啓動。

$ node-inspector --web-port 8090 
# in another terminal tab/window 
$ node --debug myfile.js 
+0

給予-c不給這個錯誤作爲其現在不打開任何瀏覽器,但不能夠看到來訪http://127.0.0.1:8090/debug?port節點檢查的UI的問題= 5858仍然存在。 – baltoro 2015-03-14 01:18:09

+0

你的第二套命令解決了我的問題,即單獨運行node-inspector和node --debug。謝謝。 – baltoro 2015-03-14 01:34:51