I have an editor created using the CKEditor online builder. besides that, I have created a plugin which I would like to use with this editor.
In order to test out my plugin, I have Done the following:
- Executed
npm linkin the plugin source folder - Executed
npm link ckeditor5-variables-pluginin the editor source folder. As described here - Deleted
node_modulesfolder from both sources - Executed
npm installin the editor source folder (this populatesnode_modulesin both folders btw) - Executed
npm lsin the plugin source folder - no issues - Executed
npm lsin the editor source folder - several extraneous entries - Executed
webpack --mode productionin the editor source folder - no issues - Opened the
sample/index.htmlfile in a browser - this gives
CKEditorError: ckeditor-duplicated-modules: Some CKEditor 5 modules are duplicated.
No matter how or what I change, I can't get rid of this. I have followed all the guides in the read more link provided with the error. As I see it, the issue is the several includes in npm issue, coupled with npm's inability to dedupe the packages when it is a devDependencies entry... moving all the devDependencies into dependencies in the editor did nothing to change it...
I have tried ncu -u and npm dedupe as well with no luck. Any help or advice is appreciated.
Editor package.json devDependencies
"devDependencies": {
"@ckeditor/ckeditor5-autoformat": "^20.0.0",
"@ckeditor/ckeditor5-basic-styles": "^20.0.0",
"@ckeditor/ckeditor5-block-quote": "^20.0.0",
"@ckeditor/ckeditor5-dev-utils": "^21.0.0",
"@ckeditor/ckeditor5-dev-webpack-plugin": "^21.0.0",
"@ckeditor/ckeditor5-editor-classic": "^20.0.0",
"@ckeditor/ckeditor5-essentials": "^20.0.0",
"@ckeditor/ckeditor5-font": "^20.0.0",
"@ckeditor/ckeditor5-heading": "^20.0.0",
"@ckeditor/ckeditor5-indent": "^20.0.0",
"@ckeditor/ckeditor5-link": "^20.0.0",
"@ckeditor/ckeditor5-list": "^20.0.0",
"@ckeditor/ckeditor5-paragraph": "^20.0.0",
"@ckeditor/ckeditor5-paste-from-office": "^20.0.0",
"@ckeditor/ckeditor5-remove-format": "^20.0.0",
"@ckeditor/ckeditor5-theme-lark": "^20.0.0",
"@ckeditor/ckeditor5-typing": "^20.0.0",
"postcss-loader": "^3.0.0",
"raw-loader": "^4.0.1",
"style-loader": "^1.2.1",
"terser-webpack-plugin": "^3.0.2",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12",
"ckeditor5-variables-plugin": "file:../../ckeditor5-variables"
}
Plugin package.json Dependencies
"dependencies": {
"@ckeditor/ckeditor5-basic-styles": "^20.0.0",
"@ckeditor/ckeditor5-essentials": "^20.0.0",
"@ckeditor/ckeditor5-paragraph": "^20.0.0",
"@ckeditor/ckeditor5-editor-classic": "^20.0.0"
},
"devDependencies": {
"postcss-loader": "^3.0.0",
"raw-loader": "^4.0.1",
"style-loader": "^1.2.1",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12",
"@ckeditor/ckeditor5-utils": "^20.0.0",
"@ckeditor/ckeditor5-core": "^20.0.0",
"@ckeditor/ckeditor5-widget": "^20.0.0",
"@ckeditor/ckeditor5-ui": "^20.0.0",
"@ckeditor/ckeditor5-theme-lark": "^20.0.0",
"@ckeditor/ckeditor5-dev-utils": "^21.0.0",
"@ckeditor/ckeditor5-dev-webpack-plugin": "^21.0.0"
}