40fathoms
TTCTheo's Typesafe Cult
•Created by 40fathoms on 6/8/2023 in #questions
CKEditor 5 and Next.js integration - working in development environment but not in production
I'm trying to use the CKEditor 5 online builder (https://ckeditor.com/ckeditor-5/online-builder/) in my Next.js application. I downloaded the customized editor file, added it to my application folder, at the same level as , then ran the command, as instructed here: https://github.com/ckeditor/ckeditor5/issues/7376#issuecomment-802460193.
In development environment, it works perfectly fine. All features are performing according to my needs, and no errors occur. The issue arises when I try to ship this code to production.
The file has these commands: (image #1)
Within the build, the is executed correctly, with no errors. Before the build I also ran the command to check if the package installation had any errors: (image #2)
However, during the build, this error occurs: (image #3)
5 replies
TTCTheo's Typesafe Cult
•Created by 40fathoms on 3/4/2023 in #questions
Next.js Hydration error happening only in production.
There is a bug I've been trying to solve on the website I work at. There is one specific page that triggers an hydration error:
https://reactjs.org/docs/error-decoder.html/?invariant=418
https://reactjs.org/docs/error-decoder.html/?invariant=425
The main issue is that it only happens in production. On top of that, it only triggers when I directly access the page, or refresh it. If I'm at the home page, for example, and navigate to the page that triggers this error, it will not happen.
I've done a bit of research and this matches what is happening to me:
https://www.reddit.com/r/nextjs/comments/wlmkz6/hydration_errors_on_production_only/
However, I did modify all the localisation functions used in the application to just return an empty string and sent it to our staging / tests deployed site, and the issue was still happening.
The major issue is that this keeps firing sentry errors, clogging up the logs, and even reaching the errors limit quota available for the plan.
Since this doesn't happen in development mode, I'm a bit lost about how to actually trace the issue and fix it. So I'd just like to ask for some different ideas about how I can approach this issue.
8 replies