-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error Error: listen EADDRINUSE :::5858 when using node debug #533
Comments
I am experiencing the same problem after an upgrade today. |
Just ran in the same problem. When using git-style sub-commands, commander.js spawns a new node-process to execute the sub-command which is located in a separate js-file. When spawning a new process, commander.js is copying all original process arguments to the new process, including Line 543 in c6236d9
To fix this, try to debug the sub-command directly:
Instead of calling the main script using the sub-command as argument:
|
It should be added to the documentation, thanks @remolueoend, it works. |
If it's considered fixed please feel free to close it. I had forgotten I opened it! :) |
This looks like might be a solution on node side?
|
This issue will be resolved when v3.0.0 is released. Available now as a prerelease. See #1001 |
If you are using the node inspector for debugging git-style executable (sub)commands using node -inspect et al, the inspector port is incremented by 1 for the spawned subcommand. Shipped in v3: https://github.com/tj/commander.js/releases/tag/v3.0.0 Thanks to suggestion by @tcf909 |
I'm using node 6.0.0 and commander ^2.9.0. I'm trying to use the built-in node debugger to inspect at some breakpoints.
Case 1: If I run a script that doesn't use commander, it works:
src/cli/works.js:
Case 2: If I run my commander script without
debug
, it also works:src/cli/cli.js
src/cli/cli-grid.js
Case 3: But if I run a script with the commander and the
debug
option, it gives the following error:So it seems that there's some sort of issue being cause by using the debugger and commander at the same time. I've searched other issues, but found nothing directly relevant. Thanks in advance.
The text was updated successfully, but these errors were encountered: