Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/next/errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -1162,5 +1162,6 @@
"1161": "\"unstable_prefetch\" is a route segment config and can only be used when the segment is a Server Component module. Remove the \"use client\" directive from \"%s\" to use this API.",
"1162": "Route \"%s\" cannot use \\`export const unstable_instant = ...\\` without enabling \\`cacheComponents\\`.",
"1163": "Unexpected cache miss after cache warming phase during prerendering. This is likely caused by non-deterministic arguments that differ between the cache warming phase and the final prerender phase (e.g. unstable array order). Ensure that arguments passed to cached functions are deterministic.",
"1164": "Response body exceeded maximum size of %s bytes"
"1164": "Response body exceeded maximum size of %s bytes",
"1165": "You cannot use both a required and optional catch-all route at the same level (\"[...%s]\" and \"%s\" )."
}
2 changes: 1 addition & 1 deletion packages/next/src/shared/lib/router/utils/sorted-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class UrlNode {
if (isOptional) {
if (this.restSlugName != null) {
throw new Error(
`You cannot use both an required and optional catch-all route at the same level ("[...${this.restSlugName}]" and "${urlPaths[0]}" ).`
`You cannot use both a required and optional catch-all route at the same level ("[...${this.restSlugName}]" and "${urlPaths[0]}" ).`
)
}

Expand Down
2 changes: 1 addition & 1 deletion test/unit/page-route-sorter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ describe('getSortedRoutes', () => {
expect(() =>
getSortedRoutes(['/[...one]', '/[[...one]]'])
).toThrowErrorMatchingInlineSnapshot(
`"You cannot use both an required and optional catch-all route at the same level ("[...one]" and "[[...one]]" )."`
`"You cannot use both a required and optional catch-all route at the same level ("[...one]" and "[[...one]]" )."`
)
expect(() =>
getSortedRoutes(['/[[...one]]', '/[...one]'])
Expand Down
Loading