Skip to content

Could not find locale while pre-rendering page #170

@Thovi98

Description

@Thovi98

Describe the bug

Hello, I’ve recently discovered your app. It’s beautiful!
I tried to building it from sources but I come accros several issues:

  • while building the app, it failed because I didn’t set the Google and Stripe environment variables. As I plan to host it form my own purpose, I didn’t think it would be required? Anymay, I’ve set dummy data.
  • now I’ve successfully built the app, but when I try to access it at my domain, I’ve following error:
    Application error: a server-side exception has occurred while loading mydomain.tld

Logs:

> [email protected] start
> next start

   ▲ Next.js 15.2.3
   - Local:        http://localhost:3004
   - Network:      http://192.168.1.43:3004

 ✓ Starting...
 ✓ Ready in 762ms
 ⨯ Error: Could not find locale while pre-rendering page, make sure you called `setStaticParamsLocale` at the top of your pages
    at <unknown> (.next/server/chunks/6173.js:136:3277)
    at Generator.next (<anonymous>)
    at <unknown> (.next/server/chunks/6173.js:136:2598)
    at new Promise (<anonymous>)
    at u (.next/server/chunks/6173.js:136:2418)
    at <unknown> (.next/server/chunks/6173.js:136:3088)
    at <unknown> (.next/server/chunks/6173.js:136:4534)
    at Generator.next (<anonymous>)
    at <unknown> (.next/server/chunks/6173.js:136:2598) {
  digest: '2713846783'
}
 ⨯ Error: Could not find locale while pre-rendering page, make sure you called `setStaticParamsLocale` at the top of your pages
    at <unknown> (.next/server/chunks/6173.js:136:3277)
    at Generator.next (<anonymous>)
    at <unknown> (.next/server/chunks/6173.js:136:2598)
    at new Promise (<anonymous>)
    at u (.next/server/chunks/6173.js:136:2418)
    at <unknown> (.next/server/chunks/6173.js:136:3088)
    at <unknown> (.next/server/chunks/6173.js:136:4534)
    at Generator.next (<anonymous>)
    at <unknown> (.next/server/chunks/6173.js:136:2598) {
  digest: '2713846783'
}
 ⨯ Error: Could not find locale while pre-rendering page, make sure you called `setStaticParamsLocale` at the top of your pages
    at <unknown> (.next/server/chunks/6173.js:136:3277)
    at Generator.next (<anonymous>)
    at <unknown> (.next/server/chunks/6173.js:136:2598)
    at new Promise (<anonymous>)
    at u (.next/server/chunks/6173.js:136:2418)
    at <unknown> (.next/server/chunks/6173.js:136:3088)
    at <unknown> (.next/server/chunks/6173.js:136:4534)
    at Generator.next (<anonymous>)
    at <unknown> (.next/server/chunks/6173.js:136:2598) {
  digest: '2713846783'
}

To Reproduce Steps to reproduce the behavior:
Install the app by following the guide in the Readme (for production)

Desktop (please complete the following information):

  • OS: Debian 12 Bookworm
  • Browser: Firefox 141.0.3

Additional context Add any other context about the problem here.
I’m packaging the app for YunoHost, see the package here

Thanks for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions