Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Next.js 15 Canary / withPayload / .mts #1300

Closed
3 tasks done
Dan6erbond opened this issue Aug 29, 2024 · 2 comments
Closed
3 tasks done

Issue with Next.js 15 Canary / withPayload / .mts #1300

Dan6erbond opened this issue Aug 29, 2024 · 2 comments
Labels
bug Something isn't working unconfirmed Needs triage.

Comments

@Dan6erbond
Copy link

Description

I'm trying to use next-intl with Next.js 15 Canary and Payload 3 Beta, so I'm aware there might be bugs caused by being on the bleeding edge, but I'm running into an issue with the plugin loading the i18n.ts config file:

Error: Couldn't find next-intl config file. Please follow the instructions at https://next-intl-docs.vercel.app/docs/getting-started/app-router

I tried everything, from adding the following to my next.config.mts:

  experimental: {
    turbo: {
      resolveAlias: {
        "next-intl/config": "./src/i18n/config.ts",
      },
    },
  },

To moving the config.ts file to the default src/i18n.ts location, all to no avail.

Verifications

  • I've verified that the problem I'm experiencing isn't covered in the docs.
  • I've searched for similar, existing issues on GitHub and Stack Overflow.
  • I've compared my app to a working example to look for differences.

Mandatory reproduction URL

https://gitea.ravianand.me/Dan6erbond/localbites-landing-page/src/branch/feature/next-intl

Reproduction description

Steps to reproduce:

  1. Open reproduction
  2. Launch app
  3. See error

Expected behaviour

My website should open and I should be redirected to the homepage.

@Dan6erbond Dan6erbond added bug Something isn't working unconfirmed Needs triage. labels Aug 29, 2024
@amannn
Copy link
Owner

amannn commented Aug 29, 2024

Hey! Can you try to isolate the issue further to pinpoint the exact place where the setup breaks?

I had a quick go at adding payload@beta, next@canary, react@rc and react-dom@rc to https://github.com/amannn/next-intl-bug-repro-app-router. I've then added withPayload and the setup still works.

Maybe you could try to diagnose the issue from that path, ideally noticing a single line change that causes the issue. Let me know if you can find something from this angle!

@Dan6erbond
Copy link
Author

Well, it seems like I'm unable to reproduce the issue now in a new Next.js app. No idea what's different between the two because I started with the Next.js + next-intl setup, then added Payload and it still works. So I must be missing something in my setup in the repo I shared. I'll have to give it a closer look but for now I'll close this issue since it isn't related to next-intl. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed Needs triage.
Projects
None yet
Development

No branches or pull requests

2 participants