Skip to content

i18n zh-CN show 404 not found #1280

@CN059

Description

@CN059

I use npx create-docus my-docs -t i18n to create a project.
and I set zh-CN as the default language in this project,like this(nuxt.config.ts):

export default defineNuxtConfig({
  extends: ["docus"],
  modules: ["@nuxtjs/i18n"],
  i18n: {
    defaultLocale: "zh-CN",
    locales: [
      {
        code: "zh-CN",
        name: "简体中文",
      },
      {
        code: "en",
        name: "English",
      },
      {
        code: "fr",
        name: "Français",
      },
    ],
  },
});

zh-CN folder I had created:

.
├── en
│   ├── 1.getting-started
│   │   ├── 2.introduction.md
│   │   ├── 3.installation.md
│   │   ├── 4.project-structure.md
│   │   ├── 5.studio.md
│   │   ├── 6.migration.md
│   │   └── 7.troubleshooting.md
│   ├── 2.essentials
│   │   ├── 1.markdown-syntax.md
│   │   ├── 2.code-blocks.md
│   │   ├── 3.components.md
│   │   └── 4.images-embeds.md
│   └── index.md
├── fr
│   ├── 1.getting-started
│   │   ├── 2.introduction.md
│   │   ├── 3.installation.md
│   │   ├── 4.project-structure.md
│   │   ├── 5.studio.md
│   │   ├── 6.migration.md
│   │   └── 7.troubleshooting.md
│   ├── 2.essentials
│   │   ├── 1.markdown-syntax.md
│   │   ├── 2.code-blocks.md
│   │   ├── 3.components.md
│   │   └── 4.images-embeds.md
│   └── index.md
└── zh-CN
    ├── 1.getting-started
    │   ├── 2.introduction.md
    │   ├── 3.installation.md
    │   ├── 4.project-structure.md
    │   ├── 5.studio.md
    │   ├── 6.migration.md
    │   └── 7.troubleshooting.md
    ├── 2.essentials
    │   ├── 1.markdown-syntax.md
    │   ├── 2.code-blocks.md
    │   ├── 3.components.md
    │   └── 4.images-embeds.md
    └── index.md

but,when I use bun dev runto start server.
the localhost:3000/zh-CN show 404 error.

but other language no error.
I try other way to solve this problem,but no result.

this is the full log when I run bun run dev:

cn059@cn059-2 docs % bun run dev
$ nuxt dev --extends docus
│                                                                                                                                                           11:09:11
●  Nuxt 4.3.1 (with Nitro 2.13.1, Vite 7.3.1 and Vue 3.5.28)
                                                                                                                                                            11:09:11
  ➜ Local:    http://localhost:3000/
  ➜ Network:  use --host to expose

                                                                                                                                                            11:09:20

 WARN  Slow module nuxt-og-image took 6326.35ms to setup.                                                                                                   11:09:20


 WARN  nuxt-llms require a domain to be set. llms.domain is missing.                                                                              nuxt-llms 11:09:20


 WARN  AI assistant disabled: AI_GATEWAY_API_KEY not found                                                                                            Docus 11:09:20

  ➜ DevTools: press Shift + Option + D in the browser (v3.2.1)                                                                                              11:09:20

✔ Processed 7 collections and 26 files in 144.44ms (26 cached, 0 parsed)                                                                     @nuxt/content 11:09:20
ℹ Nuxt Icon server bundle mode is set to local                                                                                                             11:09:21
ℹ VS Code detected. Install Nuxt MCP server                                                                                            @nuxtjs/mcp-toolkit 11:09:21
✔ /mcp enabled with 2 tools                                                                                                            @nuxtjs/mcp-toolkit 11:09:21
✔ Vite client built in 69ms                                                                                                                                11:09:22
✔ Vite server built in 21ms                                                                                                                                11:09:22
✔ Nuxt Nitro server built in 2054ms                                                                                                                  nitro 11:09:25
ℹ Vite server warmed up in 1ms                                                                                                                             11:09:25
ℹ Vite client warmed up in 2ms                                                                                                                             11:09:25
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query?t=1771384180843"                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query"                                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query?t=1771384180846"                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query?t=1771384180846"                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query"                                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query"                                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query?t=1771384180843"                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query?t=1771384180846"                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query"                                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query"                                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query?t=1771384180937"                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query?t=1771384180937"                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query?t=1771384180846"                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query"                                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query"                                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query"                                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query?t=1771384180965"                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query"                                                          11:09:40
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/landing_zh-CN/query?t=1771384181591"                                       11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/landing_zh-CN/query?t=1771384181593"                                       11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/landing_zh-CN/query?t=1771384181594"                                       11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/landing_zh-CN/query"                                                       11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/landing_zh-CN/query"                                                       11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/landing_zh-CN/query"                                                       11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/landing_zh-CN/query?t=1771384181593"                                       11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/landing_zh-CN/query?t=1771384181594"                                       11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/landing_zh-CN/query"                                                       11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/landing_zh-CN/query"                                                       11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/landing_zh-CN/query?t=1771384181591"                                       11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/landing_zh-CN/query"                                                       11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query?t=1771384181656"                                          11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query?t=1771384181657"                                          11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query"                                                          11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query"                                                          11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query?t=1771384181666"                                          11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query"                                                          11:09:41
 ERROR  [request error] [fatal] [GET] http://localhost:3000/zh-CN                                                                                           11:09:41

 
ℹ Error: Page not found

 ⁃ at createError (node_modules/h3/dist/index.mjs:71:15)

   66 ┃      return new H3Error(input);
   67 ┃    }
   68 ┃    if (isError(input)) {
   69 ┃      return input;
   70 ┃    }
 ❯ 71 ┃    const err = new H3Error(input.message ?? input.statusMessage ?? "", {
   72 ┃      cause: input.cause || input
   73 ┃    });
   74 ┃    if (hasProp(input, "stack")) {
   75 ┃      try {
   76 ┃        Object.defineProperty(err, "stack", {

 ⁃ at createError (node_modules/nuxt/dist/app/composables/error.js:45:58)
 ⁃ at setup (node_modules/docus/app/templates/landing.vue:39:50)

[CAUSE]
{
  statusCode: 404,
  statusMessage: 'Page not found',
  fatal: true,
}
 ERROR  [request error] [fatal] [GET] http://localhost:3000/zh-CN                                                                                           11:09:41

 
ℹ Error: Page not found

 ⁃ at createError (node_modules/h3/dist/index.mjs:71:15)

   66 ┃      return new H3Error(input);
   67 ┃    }
   68 ┃    if (isError(input)) {
   69 ┃      return input;
   70 ┃    }
 ❯ 71 ┃    const err = new H3Error(input.message ?? input.statusMessage ?? "", {
   72 ┃      cause: input.cause || input
   73 ┃    });
   74 ┃    if (hasProp(input, "stack")) {
   75 ┃      try {
   76 ┃        Object.defineProperty(err, "stack", {

 ⁃ at createError (node_modules/nuxt/dist/app/composables/error.js:45:58)
 ⁃ at setup (node_modules/docus/app/templates/landing.vue:39:50)

[CAUSE]
{
  statusCode: 404,
  statusMessage: 'Page not found',
  fatal: true,
}
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query?t=1771384181804"                                          11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query"                                                          11:09:41
 ERROR  [request error] [fatal] [GET] http://localhost:3000/zh-CN                                                                                           11:09:41

 
ℹ Error: Page not found

 ⁃ at createError (node_modules/h3/dist/index.mjs:71:15)

   66 ┃      return new H3Error(input);
   67 ┃    }
   68 ┃    if (isError(input)) {
   69 ┃      return input;
   70 ┃    }
 ❯ 71 ┃    const err = new H3Error(input.message ?? input.statusMessage ?? "", {
   72 ┃      cause: input.cause || input
   73 ┃    });
   74 ┃    if (hasProp(input, "stack")) {
   75 ┃      try {
   76 ┃        Object.defineProperty(err, "stack", {

 ⁃ at createError (node_modules/nuxt/dist/app/composables/error.js:45:58)
 ⁃ at setup (node_modules/docus/app/templates/landing.vue:39:50)

[CAUSE]
{
  statusCode: 404,
  statusMessage: 'Page not found',
  fatal: true,
}
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query?t=1771384181808"                                          11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query"                                                          11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query?t=1771384181937"                                          11:09:41
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/query"                                                          11:09:41
 ERROR  [request error] [fatal] [GET] http://localhost:3000/zh-CN                                                                                           11:09:42

 
ℹ Error: Page not found

 ⁃ at createError (node_modules/h3/dist/index.mjs:71:15)

   66 ┃      return new H3Error(input);
   67 ┃    }
   68 ┃    if (isError(input)) {
   69 ┃      return input;
   70 ┃    }
 ❯ 71 ┃    const err = new H3Error(input.message ?? input.statusMessage ?? "", {
   72 ┃      cause: input.cause || input
   73 ┃    });
   74 ┃    if (hasProp(input, "stack")) {
   75 ┃      try {
   76 ┃        Object.defineProperty(err, "stack", {

 ⁃ at createError (node_modules/nuxt/dist/app/composables/error.js:45:58)
 ⁃ at setup (node_modules/docus/app/templates/landing.vue:39:50)

[CAUSE]
{
  statusCode: 404,
  statusMessage: 'Page not found',
  fatal: true,
}
 ERROR  [request error] [fatal] [GET] http://localhost:3000/zh-CN                                                                                           11:09:42

 
ℹ Error: Page not found

 ⁃ at createError (node_modules/h3/dist/index.mjs:71:15)

   66 ┃      return new H3Error(input);
   67 ┃    }
   68 ┃    if (isError(input)) {
   69 ┃      return input;
   70 ┃    }
 ❯ 71 ┃    const err = new H3Error(input.message ?? input.statusMessage ?? "", {
   72 ┃      cause: input.cause || input
   73 ┃    });
   74 ┃    if (hasProp(input, "stack")) {
   75 ┃      try {
   76 ┃        Object.defineProperty(err, "stack", {

 ⁃ at createError (node_modules/nuxt/dist/app/composables/error.js:45:58)
 ⁃ at setup (node_modules/docus/app/templates/landing.vue:39:50)

[CAUSE]
{
  statusCode: 404,
  statusMessage: 'Page not found',
  fatal: true,
}
 ERROR  [request error] [fatal] [GET] http://localhost:3000/zh-CN                                                                                           11:09:42

 
ℹ Error: Page not found

 ⁃ at createError (node_modules/h3/dist/index.mjs:71:15)

   66 ┃      return new H3Error(input);
   67 ┃    }
   68 ┃    if (isError(input)) {
   69 ┃      return input;
   70 ┃    }
 ❯ 71 ┃    const err = new H3Error(input.message ?? input.statusMessage ?? "", {
   72 ┃      cause: input.cause || input
   73 ┃    });
   74 ┃    if (hasProp(input, "stack")) {
   75 ┃      try {
   76 ┃        Object.defineProperty(err, "stack", {

 ⁃ at createError (node_modules/nuxt/dist/app/composables/error.js:45:58)
 ⁃ at setup (node_modules/docus/app/templates/landing.vue:39:50)

[CAUSE]
{
  statusCode: 404,
  statusMessage: 'Page not found',
  fatal: true,
}
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/sql_dump.txt?t=1771384189144"                                   11:09:49
 WARN  [Vue Router warn]: No match found for location with path "/__nuxt_content/docs_zh-CN/sql_dump.txt"

this is the log when I run bun run build:
build.log

and this is devtools' message:

Image

this is the router's message:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions