When I first started using CKEditor 5 with create-react-app, I installed CKEditor as an npm module, and imported the ClassicEditor build as recommended by the quickstart.
Development mode (via npm start) worked well, and I was happily integrating CKEditor with React, but as soon as I ran npm run build (which generates the create-react-app production build), I ended up with the following error:
> [email protected] build c:\Dev\scratch\ckeditor-integration > node scripts/build.js Creating an optimized production build... Failed to compile. Failed to minify the code from this file: ./node_modules/@ckeditor/ckeditor5-build-classic/build/ckeditor.js:5:7350 Read more here: http://bit.ly/2tRViJ9 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] build: `node scripts/build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Ruh-roh. What to do next? How can I solve this? Is this solvable? Is there another way?