-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Cannot start node inspector: "address already in use" #11030
Comments
I confirm this new behaviour, we need to figure out what are the different actual nodejs processes launched behind the I had a look in the next source code but could not figure out what are the actual processes. |
Update: I found the issue. When running As a result, another Node.js process is spawned with the same process.env.NODE_OPTIONS='--inspect' and will also try to start a debugger on the same port than the one the main This is a known issue from Node.js but there's not much that they will do about it for good reasons, see nodejs/node#9435 (comment) But we can do something, I tried it and it works, just remove any --inspect flag from NODE_OPTIONS passed to the worker and done, see the PR: #11041 |
Related issue #11095 |
Just updated the PR for that to solve it. |
* fix(debugging): do not pass NODE_OPTIONS='--inspect' to subprocesses fixes #11030 * fix(debugger): use a regex to remove bad NODE_OPTIONS flags Co-authored-by: Alec Larson <alec.stanford.larson@gmail.com>
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
After upgrading from Next 9.2.2 -> 9.3.0 the node inspector fails to start (crashing the Next process) with the error "Starting inspector on 0.0.0.0:9229 failed: address already in use".
None of the suggestions offered in #10610 or #9027 have helped. Have also tested with Next 9.3.1-canary.3 and noted the same issue occurs.
To Reproduce
Steps to reproduce the behavior:
npx create-next-app
"dev": "NODE_OPTIONS='--inspect' next"
to scriptsnpm run dev
Expected behavior
The node inspector starts normally without crashing the Next process.
System information
The text was updated successfully, but these errors were encountered: