You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the new Nuxt 4 directory structure in Layers with customRoutes: "config" the following warning is returned and no valid routes are generated for locales: [@nuxtjs/i18n]: Couldn't find AnalyzedNuxtPageMeta by NuxtPage (/custom/:slug()), so no custom route for it .
This occurs, because the pages directory is not resolved correctly in this function:
When patching part of the function specified above from: const lPath = resolve(project.config.rootDir, l.config.rootDir, l.config.dir?.pages ?? 'pages')
to: const lPath = resolve(project.config.rootDir, l.config.srcDir, l.config.dir?.pages ?? 'pages')
then everything appears to work correctly.
Logs
No response
The text was updated successfully, but these errors were encountered:
Sorry for the late response I hope the patch is working fine still. I have just opened a PR with your suggested fix (#3133), which will probably be included it in the next patch release (likely within a week).
Environment
Darwin
v20.5.1
3.13.0
3.13.0
2.9.7
[email protected]
-
-
-
-
Reproduction
Reproduction: https://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-knvwuy?file=src%2Flayers%2Fcustom-layer%2Fnuxt.config.ts
Describe the bug
When using the new Nuxt 4 directory structure in Layers with
customRoutes: "config"
the following warning is returned and no valid routes are generated for locales:[@nuxtjs/i18n]: Couldn't find AnalyzedNuxtPageMeta by NuxtPage (/custom/:slug()), so no custom route for it
.This occurs, because the pages directory is not resolved correctly in this function:
i18n/src/layers.ts
Line 77 in 4df3491
Additional context
When patching part of the function specified above from:
const lPath = resolve(project.config.rootDir, l.config.rootDir, l.config.dir?.pages ?? 'pages')
to:
const lPath = resolve(project.config.rootDir, l.config.srcDir, l.config.dir?.pages ?? 'pages')
then everything appears to work correctly.
Logs
No response
The text was updated successfully, but these errors were encountered: