Next.js 15 Localization error when switching languages

Describe your question/issue in detail

I tried following the following tutorial regarding Localization with Prismic in Next.js: https://prismic.io/blog/nextjs-i18n

And for some reason, the sample content (documents), does NOT show up in the repo after following all the steps. This also goes for the repo GitHub - prismicio-community/nextjs-starter-prismic-multi-language: Multi-language project with Next.js & Prismic .. I successfully hook it up to a Prismic repo, but no sample data..

For this topic's continuation: I cloned the repo like so: npx @slicemachine/init@latest --repository <your repository name> --starter prismic-i18n-tutorial (yes, with the matching repo name I created).

That said, I created a few documents myself and continued through the tutorial and ended up making the app with locales work. (See the public repo: GitHub - HalloJo/next-prismic-locale).

BUT

I keep getting the following errors when switching between languages (which works by the way):

I would like to paste the code of my [lang]/[uid]/page.tsx in here, but that would make it too bulky IMO. I also followed the link Dynamic APIs are Asynchronous | Next.js to read about the error, but that makes me none the wiser.

Recap:

  • 2 errors; No sample content/data when cloning prismic repos and the error regarding awaiting, but it does work.

Is there something I overlooked, as I am already awaiting the params/props?

Thanks in advance for the help!

Hi @jorikvanruiswijk,

Thank you for reaching out. We've discovered an issue when installing repos from the CLI where indeed, everything gets pushed properly except the sample documents. There is a workaround, it's inelegant and we'll be looking at a solution, but it is to rerun the installation and instead of creating a new repository, when the script prompts it, link to an existing one (so for example the empty one that was just created). All the documents will be there and show up normally the second time around, and you should be able to continue normally. Apologies about that!

I'm not sure the second error you encountered is linked, but would you mind trying the workaround and letting us know if you still run in the same issue after the documents were pushed properly? Thank you :slight_smile: