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
34 lines
715 B
Plaintext
34 lines
715 B
Plaintext
---
|
|
title: Conflicting Public File and Page File
|
|
---
|
|
|
|
## Why This Error Occurred
|
|
|
|
One of your public files has the same path as a page file which is not supported. Since only one resource can reside at the URL both public files and page files must be unique.
|
|
|
|
## Possible Ways to Fix It
|
|
|
|
Rename either the public file or page file that is causing the conflict.
|
|
|
|
Example conflict between public file and page file
|
|
|
|
```bash filename="Folder structure"
|
|
public/
|
|
hello
|
|
pages/
|
|
hello.js
|
|
```
|
|
|
|
Non-conflicting public file and page file
|
|
|
|
```bash filename="Folder structure"
|
|
public/
|
|
hello.txt
|
|
pages/
|
|
hello.js
|
|
```
|
|
|
|
## Useful Links
|
|
|
|
- [Static file serving docs](/docs/pages/api-reference/file-conventions/public-folder)
|