Skip to content

Commit

Permalink
closes vercel#55050, add error doc
Browse files Browse the repository at this point in the history
  • Loading branch information
olingern committed Sep 12, 2023
1 parent be6e8b0 commit 20b98fd
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
27 changes: 27 additions & 0 deletions errors/reserved-port.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: Reserved Port
---

## Why This Error Occurred

Server was started on a reserved port. For example, `4045` is reserved for the Network Paging Protocol (npp).

```
next start -p 4045
```

or

```
next dev -p 4045
```

Starting the server on a reserved port will result in an error.

## Possible Ways to Fix It

Visit the [port blocking](https://fetch.spec.whatwg.org/#port-blocking) section of WHATWG's fetch spec and ensure your port is not on the known reserved port list.

## Useful Links

- https://fetch.spec.whatwg.org/#port-blocking
5 changes: 4 additions & 1 deletion test/integration/cli/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,10 @@ describe('CLI Usage', () => {
})

test('-p reserved', async () => {
const { stderr, stdout } = await runAndCaptureOutput({ port: 1 })
const TCP_MUX_PORT = 1
const { stderr, stdout } = await runAndCaptureOutput({
port: TCP_MUX_PORT,
})

expect(stdout).toMatch('')
expect(stderr).toMatch("Bad port: '1' is reserved for tcpmux")
Expand Down

0 comments on commit 20b98fd

Please sign in to comment.