bun
bun copied to clipboard
macOS cannot run `bun run` with HTTP Serve
What version of Bun is running?
0.3.0
What platform is your computer?
Darwin 22.2.0 x86_64 i386
What steps can reproduce the bug?
Download https://github.com/nanoexpress/static-serve-benchmark/blob/master/src/bun.js and run bun run --hot bun.js
on macOS
What is the expected behavior?
Running HTTP Serve
What do you see instead?
❯ bun run src/bun.js
12 | if(typeof entryNamespace?.default?.fetch === 'function') {
13 | Bun.serve(entryNamespace.default);
14 | }
15 | }, reportError);
16 | } else if (typeof entryNamespace?.default?.fetch === 'function') {
17 | Bun.serve(entryNamespace.default);
^
error: Failed to start server. Is port 5000 in use?
at bun:main:17:3
Additional information
Other my issues: #1655, #1654
Hello!
This is a know "error" in MacOs Monterey and beyond.
MacOs runs an Airplay server that uses port 5000.
You have two solutions:
- Change the port used in your bun application
- Disable the Airplay server in your system preferences that runs on port 5000.
You can see more informations here: https://nono.ma/port-5000-used-by-control-center-in-macos-controlce
@AmFlint Thank you, sorry, i didn't noticed or searched for it. Used port 4400
and it worked
I had the same problem a few months ago haha