-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Trying to run bun with --inspect crashes with Failed to start server. #5639
Comments
If Bun fails to open the inspector on 6499, it should probably just use 0 for the next attempt. |
Even if I specify a custom port via --inspect=42424 it still fails with a message similar to the one above (with the new port number). |
I am having the same issue, but only when using bun inside a docker container, even though I expose that particular port. |
I had the same error with the debugger. I wondered because the port mentioned in the error message is not in use on my system. So I traced the system calls of |
same as @JStaWZL. removing ::1 localhost,... from the /etc/hosts file from my VSCode Dev Container fixed it. i dont have ipv6 in this dev container at all, so that's perhaps the issue. |
I have the same issue suddenly! one thing that bugs me is that bun spawns the inspector when I use |
The same problem, today, for some reason, bun decided to run inspector on my machine, although the --inspect flag is not used. I didn't do any updates, bun -v: 1.1.34 Important updating to the latest version resolves the issue with the inspect flag $ bunx --bun vite --port 9001 --host
Failed to start inspector:
44 | };
45 | }, this.#listen();
46 | }
47 | get url() {
48 | return this.#url;
49 | #listen() {
^
EADDRINUSE: Failed to start server. Is port 52479 in use?
syscall: "listen"
at #listen (internal:debugger:49:10)
at new Debugger (internal:debugger:35:14)
at internal:debugger:3:13
error: script "dev" exited with code 1 p.s. after restarting the system, the port became available, but the second project on bun does not turn on due to the same error, although the inspect flag is set to a different port: $ bun tsc && bun --inspect=4000 --watch run src/index.ts
Failed to start inspector:
44 | };
45 | }, this.#listen();
46 | }
47 | get url() {
48 | return this.#url;
49 | #listen() {
^
EADDRINUSE: Failed to start server. Is port 52479 in use?
syscall: "listen"
at #listen (internal:debugger:49:10)
at new Debugger (internal:debugger:35:14)
at internal:debugger:3:13
error: script "dev" exited with code 1 |
thanks for answering, extension now is disabled, but maybe i am not restarted vscode. After reopen project, all work well |
What version of Bun is running?
1.0.2+37edd5a6e389265738e89265bcbdf2999cb81a49
What platform is your computer?
Linux 6.4.15-100.fc37.x86_64 x86_64 x86_64
What steps can reproduce the bug?
index.ts:
Then run:
What is the expected behavior?
I'd expect no crash and an URL for the web debugger debug.bun.sh being printed to the console.
What do you see instead?
Additional information
No response
The text was updated successfully, but these errors were encountered: