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)
4 Replies
This is (part of) the code showcasing how my editor is being used:
In the build logs, the error was traced back to the page tsx file importing my component. This is how it is being imported:
After some research, I still can't fathom what I'm doing wrong and why this error only occurs when deploying to production, so I'd like to ask for some help regarding this. The application is deployed to AWS.
For more details regarding ckeditor integration with next.js, there is this issue here: https://github.com/ckeditor/ckeditor5/issues/7376
Thanks in advance!
image #1
image #2
image #3