2015-02-24 73 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