mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
93a9e97c71
Closes: https://linear.app/vercel/issue/DOC-4604/public-folder - Renames "Static Assets" page to "Public Folder" and moves it to the file-system conventions section. Redirects: https://github.com/vercel/front/pull/44623
18 lines
476 B
Plaintext
18 lines
476 B
Plaintext
---
|
|
title: Cannot output to /static
|
|
---
|
|
|
|
## Why This Error Occurred
|
|
|
|
Either you set `distDir` to `static` in your `next.config.js` or during `next export` you tried to export to the `static` directory.
|
|
|
|
This is not allowed because `static` is used by Next.js to serve static assets.
|
|
|
|
## Possible Ways to Fix It
|
|
|
|
Use a different `distDir` or export to a different folder.
|
|
|
|
## Useful Links
|
|
|
|
- [Static file serving docs](/docs/pages/api-reference/file-conventions/public-folder)
|