Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
6 of 11 tasks
albrtkinn opened this issue Nov 3, 2022 · 0 comments

Comments

@albrtkinn
Copy link

albrtkinn commented Nov 3, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant