GithubHelp home page GithubHelp logo

Comments (8)

atakanyurttutann avatar atakanyurttutann commented on July 29, 2024

I have that same problem

from next-intl.

damien-schneider avatar damien-schneider commented on July 29, 2024

I encountered the same error. It occurs when I use a private window without specifying "/en" (or another language code) in the URL to initialize the variable. If I make the first request with "/en" (or the appropriate language code) in the URL, it works perfectly afterward. (Hope my example will help to find where the error comes from)

from next-intl.

github-actions avatar github-actions commented on July 29, 2024

Thank you for your report!

Unfortunately, the reproduction is missing or incomplete, and as such we cannot investigate this issue. Please add a reproduction to the issue, otherwise it will be closed automatically.

Templates:

Creating a good bug report takes time.

To help us resolve the issue quickly, please simplify the reproduction as much as possible by removing any unnecessary code, files, and dependencies that are not directly related to the problem. The easier it is for us to see the issue, the faster we can help you.

Apart from the reproduction, make sure to include the precise steps on how to reproduce the issue, e.g.:

  1. Open reproduction
  2. Click on …
  3. See error: …

Thank you for your understanding!

FAQ

"I've included a reproduction, what is missing?"

This comment might have been added because your reproduction doesn't point to a destination where the issue can be reproduced. Please make sure that the latest changes were saved in the reproduction and that the link is correct.

from next-intl.

testBP0612 avatar testBP0612 commented on July 29, 2024

I would like to clarify that I have already added a link to a repository that reproduces the bug in my original issue report. The reproduction can be found at here

from next-intl.

amannn avatar amannn commented on July 29, 2024

I was unfortunately not able to reproduce the issue in the reproduction you've provided.

These are the steps I took:

  1. Clone the repo
  2. npm i
  3. npx nx run next-app:dev
  4. Open http://localhost:3000
  5. The server redirects to /en
  6. "Hello!" is displayed

I can't see an issue there.

To be able to help with this, can you provide reproduction steps on how the issue can be reproduced in your reproduction repo?

from next-intl.

testBP0612 avatar testBP0612 commented on July 29, 2024

Thank you for taking the time to test the reproduction. I apologize for the confusion. It seems I wasn't clear enough in describing the issue. Let me provide more specific steps to reproduce the problem:

Follow the steps you've already taken (1-4).
Instead of allowing the redirect to /en, try navigating directly to any other path, for example: http://localhost:3000/123

You should then encounter the following error:

Unable to find `next-intl` locale because the middleware didn't run on this request. See https://next-intl-docs.vercel.app/docs/routing/middleware#unable-to-find-locale. The `notFound()` function will be called as a result.

from next-intl.

testBP0612 avatar testBP0612 commented on July 29, 2024

Additionally, I've just discovered that if we remove the <html /> + <body /> tags from app/layout, it causes the 404 page to break. However, if we keep these tags, we encounter an error message for other languages, such as:

Warning: Prop lang did not match. Server: "en" Client: "zh-TW"

How should we address this issue?
You can refer to my other branch: bug/lang to reproduce this problem.

from next-intl.

amannn avatar amannn commented on July 29, 2024

Have a look at the error files guidelines in the docs, that should help! I’m on vacation now for a few weeks, hope this helps to resolve your issue. If not, happy to catch up when I’m back!

from next-intl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.