ckeditor-duplicated-modules Error testing CKeditor 5 plugin locally

Viewed 413

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:

  1. Executed npm link in the plugin source folder
  2. Executed npm link ckeditor5-variables-plugin in the editor source folder. As described here
  3. Deleted node_modules folder from both sources
  4. Executed npm install in the editor source folder (this populates node_modules in both folders btw)
  5. Executed npm ls in the plugin source folder - no issues
  6. Executed npm ls in the editor source folder - several extraneous entries
  7. Executed webpack --mode production in the editor source folder - no issues
  8. Opened the sample/index.html file 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"
  }
0 Answers
Related