Next.js Discord

Discord Forum

Next Translate and 500 internal server error in production...

Unanswered
Little yellow ant posted this in #help-forum
Open in Discord
Little yellow antOP
Hello, I added English and Chinese locale routes on my Next.js 14 website.

Here are the dependencies used:
{
"next-translate": "^2.6.2",
"devDependencies": {
"next-translate-plugin": "^2.6.2"
}
}

It works perfectly fine locally, and was initially working fine in production.

However, after a decent amount of traffic I started getting internal 500 server errors.

 [Error]: Failed to load static file for page: /en/500 ENOENT: no such file or directory, open '/var/task/.next/server/pages/en/500.html'
    at /var/task/node_modules/next/dist/compiled/next-server/server.runtime.prod.js:17:10313
...
SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
    at JSON.parse (<anonymous>)
    at parseJSONFromBytes (node:internal/deps/undici/undici:5329:19)
   ...
  page: '/'
}
Error: Runtime exited with error: exit status 1


How to debug this?

Thank you.

0 Replies