-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Error: Catch-all must be the last part of the URL when using opengraph-image.tsx
inside a catch-all route
#48162
Comments
I worked around this creating two non catch all routes (as I have only two levels), but I imagine this won't work in all cases 😊 |
i got this same errror today Error: Catch-all must be the last part of the URL. i had some pages name [...addresss] , [...tokenId] removing .... got rid of the bug |
It's because you have sub routes inside the catch all route, which for example might |
It's not possible now as dynamic og image could recieve params so it's could be a lambda/edge route, but all the possible paths including the request url paths to og image are caught by the catch-all routes. For your case as it doesn't receive any params, so you can add a
So it will generate a special path for og image under that group with a suffix, which is distinct from others |
@huozhi not sure if this means it will never be supported? My use case is about having a catch-all route for pages on my site |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 Binaries: Node: 16.16.0 npm: 8.19.3 Yarn: 1.22.19 pnpm: 7.13.5 Relevant packages: next: 13.3.1-canary.3 eslint-config-next: 13.3.0 react: 18.2.0 react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true), Metadata (metadata, generateMetadata, next/head, head.js)
Link to the code that reproduces this issue
https://github.com/EuroPython/website/tree/fa47fe9a3d7a732d9536ed0200dfe9b3f992565a
(newer version have a "workaround")
To Reproduce
in the repo above try to do
npm install
and thennpm run dev
, you should get an errorDescribe the Bug
When using
opengraph-image.tsx
insideapp/[...parts]/
I get the following error:removing
opengraph-image.tsx
fixes the issue.Expected Behavior
I should be able to use
opengraph-image.tsx
inside a catch-all routeWhich browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: