Skip to content

Localized Sitemap Does Not Work #67813

@barziahmed

Description

@barziahmed

Link to the code that reproduces this issue

https://github.com/Barzi-Ahmed/my-app

To Reproduce

  1. Start application with pnpm run dev or pnpm run dev --turbo (issue is present in both).
  2. In the URL of the browser, go to sitemap.xml page by writing /sitemap.xml

STORY:
When creating sitemap.ts and using this same code from docs, this is the result I get:
image

I have searched through GitHub issues and found #63764, and there it is mentioned that you should use Next 14.2, but I already use the latest version of Next.js (details below), and this means it is still not fixed.

Current vs. Expected behavior

Obviously the mentioned sitemap sample doesn't render correctly at all as a normal XML page.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 8043
  Available CPU cores: 8
Binaries:
  Node: 20.15.1
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.5 // Latest available version is detected (14.2.5).
  eslint-config-next: 14.2.5
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Internationalization (i18n)

Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local), Vercel (Deployed), Other (Deployed)

Additional context

I use Chrome Version 126.0.6478.127 (Official Build) (64-bit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions