Skip to content

fix(dev): use a strict port when _PORT is provided to _dev - #1456

Merged
danielroe merged 1 commit into
mainfrom
fix/dev-child-strict-port
Aug 19, 2026
Merged

fix(dev): use a strict port when _PORT is provided to _dev#1456
danielroe merged 1 commit into
mainfrom
fix/dev-child-strict-port

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

📚 Description

when nuxi _dev is called, it's because test-utils wants to directly communicate with a port - we should error if we can't bind to it, rather than silently picking another one

@pkg-pr-new

Copy link
Copy Markdown
  • nuxt-cli-playground

    npm i https://pkg.pr.new/create-nuxt@1456
    
    npm i https://pkg.pr.new/nuxi@1456
    
    npm i https://pkg.pr.new/@nuxt/cli@1456
    

commit: 080092f

@danielroe
danielroe added this pull request to the merge queueAug 19, 2026
Merged via the queue into main with commit b814f4fAug 19, 2026
18 of 19 checks passed
@danielroe
danielroe deleted the fix/dev-child-strict-port branch August 19, 2026 17:56
@coderabbitai

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 03ec0b3f-f230-4eb0-8d39-d1d0c1c45800

📥 Commits

Reviewing files that changed from the base of the PR and between d0e78d4 and 080092f.

📒 Files selected for processing (3)
  • packages/nuxt-cli/src/commands/dev-child.ts
  • packages/nuxt-cli/test/unit/commands/dev-child.spec.ts
  • packages/nuxt-cli/test/unit/listen.spec.ts

📝 Walkthrough

Walkthrough

The dev child command now adds strictPort: true when _PORT is set. Tests verify the override for a configured port and for _PORT=0. Listen tests confirm that strict mode with port 0 still assigns a nonzero random port.

Estimated code review effort: 2 (Simple) | ~10 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dev-child-strict-port

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actionsgithub-actionsBot mentioned this pull request Aug 19, 2026
@codspeed-hq

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 2 untouched benchmarks


Comparing fix/dev-child-strict-port (080092f) with main (d0e78d4)

Open in CodSpeed

This was referenced Aug 24, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@danielroe