vercel / vercel/next.js

with-next-translate example broken (html, body missing in layout; 404 pages)

Open
#67,950 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

examples
Dominant language
JavaScript
Stars
142k
Forks
32.4k
Avg merge
2d 14h
Merged PRs (30d)
351

Description

Verify canary release
  • I verified that the issue exists in the latest Next.js canary release
Provide environment information
stackblitz
(but also local install via create-next-app)
Which example does this report relate to?

with-next-translate

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

When opened, says:

Missing required html tags
The following tags are missing in the Root Layout: <html>, <body>.
Read more at https://nextjs.org/docs/messages/missing-root-layout-tags

Even if the tags are added, the index page returns 404.
If manually navigated to /en as project seems to suggest, it's still 404
If manually navigated to /en-US it finally renders the page but without any translations, and all links inside lead to 404.

Expected Behavior

works.

To Reproduce
  1. go to https://github.com/vercel/next.js/tree/main/examples/with-next-translate
  2. click Stackblitz

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in examples/with-next-translate and reproduce the failure through its StackBlitz link or a local create-next-app install. Check the root layout, locale paths such as /en and /en-US, translations, and generated links. Done means the example renders at its intended entry point, displays translations, and its links and 404 pages behave correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nextjs
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.