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

Normalize page path before loading client reference manifest #69262

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from

Conversation

simonri
Copy link
Contributor

@simonri simonri commented Aug 24, 2024

What?

Fixes a bug where creating a page named /index in the app router throws a TypeError: Cannot read properties of undefined (reading 'clientModules').

The error occurs because the client reference manifest path is normalized from app/index/ to app/index/index/ to handle page router correctly. By using normalizePagePath both for the saving and loading of the manifest, this edge case is handled correctly.

Please see this repository to reproduce the bug:
https://github.com/jazsouf/redirects-test

Fixes #69061

@ijjk
Copy link
Member

ijjk commented Aug 24, 2024

Allow CI Workflow Run

  • approve CI run for commit: e0e3da7

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

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

Successfully merging this pull request may close these issues.

Cannot name a folder "index" inside the app directory.
2 participants