CKEditor fail to deploy in Heroku

I followed this guide to upgrade the rich text editor to CKEditor, and it works great in localhost. The problem is that when I try to push it to prod I get an error.
Guide I used:

Error I get:
Error: Module not found: Error: Can’t resolve ‘@ckeditor/ckeditor5-build-classic’ in ‘…/wysiwyg/admin/src/components/CKEditor’
I don’t even know if this is an issue with Strapi at all, it could very well be something with CKEditor. But if that is the case a note on the guide warning about it would be great to avoid others from running into the issue unexpectedly.

Thank you!

Hey @msg, :wave:

How did you push it to prod? Did you reinstall the packages? yarn or npm install?
Look to me like your prod doesn’t have the new added package yet (package.json).

Thanks Mattie for taking a look!
I deleted the files, tested local and production (all pushed fine, showing the “basic” editor) and started again. I used yarn (install, build). And I run into the same issue BUT:
I noticed that a package.json is being generated in the plugins folder, and it has only the 2 lines for ckeditor. I copied them over manually to the “main” package.json file (in my case in the “backend” folder of my git) and heroku run with no issues!
Not sure if I did something wrong while following the instructions to end up with 2 package.json files, or if that is ok and there should be a hook between them… but for now copy-pasting the 2 lines seems to have done the trick :slight_smile:

Thanks @msg!
I had the same problem installing Quill editor, on my local machine it worked, but when I pushed to Heroku I had the same error message.
What kind of problem is it @MattieBelt? Is the tutorial mistaken in the creation of the package.json in the plugin folder, or is it a problem with Heroku?

Try reconciling the package.json on the plugin folder with the one on the project folder.

1 Like

Yes it worked in this way, thank you! It should be better to specify it in the tutorial for everyone else that could get this error in the future.

1 Like

Strapi is well known for terrible documentaion. Best to research on your own.