3

I would like to know why am I getting the following error when I try to debug node app using node inspector.

Debugger listening on port 5858 events.js:154 throw er; //unhandled 'error' event

Error: spawn C:\Users\Dell\AppData\Local\Google\Chrome\Application\Chrome.exe ENOENT
    at exports._errnoException (util.js:890:11)
    at Process.ChildProcess._handle.inexit(internal/child_process.js:182:32)
    at onErrorNT (internal/child_process.js:348:16)
    at _combinedTickCallback (node.js:383:13)
    at process._tickCallback (node.js:407:11)

I believe this error was similar to the error reported at https://github.com/node-inspector/node-inspector/issues/732. But however I didn't get as new_chrome.exe.

Any help is appreciated

node version is 5.9.1 node debug version is 0.12.7

EDIT: Actually the problem is chrome.exe file is inside "Program Files(86)" , but while running node-debug it is searching in user folder. So it is something to do with node-module browser-launcher When I run detect.js, in browser-launcher2/examples , its returning me the correct chrome.exe path, but when I run launch.js, it is returning me the above error, since it was trying to find chrome.exe inside user folder. Any thoughts on this?

UPDATE: Added the temporary solution. It worked for me.

NOTE: This is a temporary solution. I am keeping this question open, so as to get a permanent solution for this error. Happy coding :)

Gopinath Shiva
  • 3,822
  • 5
  • 25
  • 48
  • 1
    `ENOENT` means that the file isn't there. – Pointy Mar 24 '16 at 13:25
  • Yes I know that and I tried that. Did you read the thread I linked? Also I am using chrome canary – Gopinath Shiva Mar 24 '16 at 13:33
  • Oh OK I see. Well there's *another* bug linked to that one that has some more information, but it looks like some sort of internal bug with the node inspector code. (I assume you've verified that that path really does work.) – Pointy Mar 24 '16 at 13:35
  • Could you please guide me how to resolve if u understood. I couldn't understand that – Gopinath Shiva Mar 24 '16 at 13:54
  • I'm afraid that I didn't really understand that either; it seemed to have something to do with a configuration file and/or something that caches pathnames, but I'm not very familiar with Node inspector or using Node on Windows at all for that matter. – Pointy Mar 24 '16 at 14:06
  • Appreciate the effort dude. I believe it is something to do with browser-launcher file. Actually the problem is chrome.exe file is inside "Program Files(86)" , but while running node-debug it is searching in user folder. When I run detect.js, in browser-launcher2/examples , its returning me the correct chrome.exe path, but when I run launch.js, it is returning me the above error, since it was trying to find chrome.exe inside user folder. Any thoughts on this? - https://github.com/cbas/browser-launcher2/blob/master/README.md – Gopinath Shiva Mar 24 '16 at 14:16

3 Answers3

0

I solved the above issue temporarily using James-Browser-Launcher module. Just install the module and run examples/launch.js in the terminal. Once launched, your default browser would open. Now run

node-debug

it launched the browser without error for me. Thats it. It would work now. Hope it works for you too

Gopinath Shiva
  • 3,822
  • 5
  • 25
  • 48
0

This works for me:

Go to C:\Users\youruser\ .config\browser-launcher2

open config.json

If there are more than two instances of Chrome, uninstall the error instance first and delete the error entry at file and his associated folder in this path. In my case, the error was Chrome Canary : Example

And then, node-inspector works with Standar Chrome!!!

0

I Fixed it with these simple steps.

  1. Windows+R or Open Explorer
  2. Copy/Past: %localappdata%\Temp\chromedriver
  3. Remove the folder (under the above path)

enter image description here