Closed nikhil-swamix closed 1 year ago
I can also reproduce this error with the example from https://bun.sh/guides/http/hot
After running "bun --hot run index.ts" the app loads fine, but crashes with "error: Failed to start server. Is port 3000 in use?" as soon as I edit and save the index.ts file
I've just installed bun 0.8.1 and I'm running this on Debian 10.13
Edit: I found this bug has been introduced in 0.8.0 because it doesn't crash with 0.7.3 Edit 2: Tried "bun upgrade --canary" and it upgraded to 0.8.2 and it doesn't crash anymore, so I guess this is being fixed :-)
This was fixed.
What version of Bun is running?
0.7.4+9cf868fef4ed5ed7ebcd2e6e561a1e83b35aaa43
What platform is your computer?
Linux 6.1.34-58.102.amzn2023.aarch64 aarch64 aarch64
What steps can reproduce the bug?
this is server code:
What is the expected behavior?
should hot reload like vite, webpack (frontend) but expecting for backend i have read the docs, --watch is working but --hot or watch+hot is breaking was expecting if i change small string like "apple" to "ball" and that route is available at "/" then refresh browser should show ball. and server reload must not trigger.
What do you see instead?
330 | family: isIPv6(address) ? "IPv6" : "IPv4", 331 | port: this.#server.port 332 | }; 333 | } 334 | 335 | listen(port, host, backlog, onListen) { ^ error: Failed to start server. Is port 3000 in use? at listen (node:http:335:16) at listen (/home/ec2-user/superrtruck.com/node_modules/.pnpm/express@4.18.2/node_modules/express/lib/application.js:635:9) at /home/ec2-user/superrtruck.com/app.js:32:1
Additional information
No response