Skip to content

Conflicting Public File and Page File

Source URL: https://nextjs.org/docs/messages/conflicting-public-file-page

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.

Rename either the public file or page file that is causing the conflict.

Example conflict between public file and page file

Terminal window
public/
hello
pages/
hello.js

Non-conflicting public file and page file

Terminal window
public/
hello.txt
pages/
hello.js