Skip to content

Conflicting public file and page route for /material causes server error #251

@ansarrafique

Description

@ansarrafique

Bug

I encountered a Server Error while generating the page after clicking the "View the teaching materials" button on the landing page (home page). The error message indicates a conflict between a public file and a page file for the path /material.

Error Message

Error: A conflicting public file and page file was found for path /material https://nextjs.org/docs/messages/conflicting-public-file-page

This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
DevServer.handleRequestImpl

Steps to Reproduce

  1. Clone the repository.
  2. Install the required dependencies.
  3. Start the local development server using yarn dev.
  4. Go to the home page.
  5. Click on the "View the teaching materials" button.

Expected Behavior

The application should correctly serve the teaching materials page without conflicts and without generating a server error.

System Information

  • OS: [e.g., Windows 11]
  • Browser: [e.g., Chrome, Brave]
  • Node Version: [e.g., 20.11.1]
  • NPM Version: [e.g., 10.8.2]
  • Corepack Version: [e.g., 0.29.3]
  • Yarn Version: [e.g., 3.3.0]

Additional Context

This error occurs specifically when navigating from the home page to the teaching materials page using the button provided. The conflict seems to be between a static file in the public directory and a dynamic route in the pages directory both named material.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions