Skip to content
This repository was archived by the owner on Jun 18, 2024. It is now read-only.
This repository was archived by the owner on Jun 18, 2024. It is now read-only.

Improvement to how the app and pages files conflict is shown. Especially the last log line "pages/" - "app/" made it seem like you should remove the pages folder altogether. This was a bug in how the '' case was displayed. After having a look at this I went further and added exactly which file caused the conflict given that app allows you to create app/(home)/page.js and such it saves some digging for what the actual conflicting file is. Similarly in pages both pages/dashboard/index.js and pages/dashboard.js are possible. #270

@albrtkinn

Description

@albrtkinn

Improvement to how the app and pages files conflict is shown. Especially the last log line "pages/" - "app/" made it seem like you should remove the pages folder altogether. This was a bug in how the '' case was displayed. After having a look at this I went further and added exactly which file caused the conflict given that app allows you to create app/(home)/page.js and such it saves some digging for what the actual conflicting file is. Similarly in pages both pages/dashboard/index.js and pages/dashboard.js are possible.

Before:

error - Conflicting app and page files were found, please remove the conflicting files to continue:
error -   "pages/another" - "app/another"
error -   "pages/hello" - "app/hello"
error -   "pages/" - "app/"

After:

error - Conflicting app and page files were found, please remove the conflicting files to continue:
error -   "pages/another.js" - "app/another/page.js"
error -   "pages/index.js" - "app/page.js"
error -   "pages/hello.js" - "app/hello/page.js"

Bug

  • Related issues linked using fixes #number
  • Integration tests added
  • Errors have a helpful link attached, see contributing.md

Feature

  • Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
  • Related issues linked using fixes #number
  • Integration tests added
  • Documentation added
  • Telemetry added. In case of a feature if it's used or not.
  • Errors have a helpful link attached, see contributing.md

Documentation / Examples

  • Make sure the linting passes by running pnpm build && pnpm lint
  • The "examples guidelines" are followed from our contributing doc

Originally posted by @timneutkens in vercel/next.js#42415

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