`startUnbundledServer` ignores `listen.port: 0` and falls back to port 3000
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 86/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
Read src/build/unbundled/serve.ts around line 69 and inspect how listen.port falls back to NITRO_PORT. Run the relevant case in test/unbundled/serve.test.ts, especially with port: 0. Done means port 0 is preserved and the parallel test no longer fails by binding to port 3000.
Written by the indexing model from the issue text.
Description
src/build/unbundled/serve.ts:69 uses opts.listen.port || process.env.NITRO_PORT, so port: 0 (random port) is dropped and the server listens on 3000. This makes test/unbundled/serve.test.ts fail with EADDRINUSE 127.0.0.1:3000 when another test holds port 3000 during a parallel run; using ?? should fix it.
Triaged with AI assistance.
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 932
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 164
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nitrojs/nitro
-
prerender: wait for env-runner worker readiness before crawlingPossibly taken @sarankumar1325 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
v2: backport #4683 (a package's own entry is externalized as `pkg/`, DEP0155)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
Maintainers usually reply within 1 day
-
bug externals nuxt v2 windows
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
nitrojs/nitro#4761 · 1 comment ·
Maintainers usually reply within 1 day
-
documentation v3
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
nitrojs/nitro#4555 · 5 comments ·
Maintainers usually reply within 1 day
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
cloudscape-design/components#5184 ·
Maintainers usually reply within 2 days
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
JarX-Concepts/react-native-platform-components#130 ·
Maintainers usually reply within 1 day
-
fix(api): optimize-for-web /preview outer catches miss asDecoderOutOfMemory on V8 OOM and SIGKILLOpenarea: backend bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
snapotter-hq/SnapOtter#3773 ·
Maintainers usually reply within 1 day
-
ai-driven-qa ux-audit
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
linagora/twake-contacts-frontend#386 ·
Maintainers usually reply within 1 day
-
git: README should state plainly that without --repository every reachable repository is in scopeOpendocumentation server-git v2
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
modelcontextprotocol/servers#5225 ·
Maintainers usually reply within 1 day