Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CKEditor 42 React/Vite: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node. #16639

Closed
ptmkenny opened this issue Jun 30, 2024 · 1 comment
Labels
resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). type:bug This issue reports a buggy (incorrect) behavior.

Comments

@ptmkenny
Copy link

📝 Provide detailed reproduction steps (if any)

  1. Had CKEditor 5 (v41) with custom build installed in an Ionic React app; everything was working correctly.
  2. Updated to v42 according to the guide.
  3. When I open my app in a private browser window, I get the following error:
Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.

✔️ Expected result

I don't expect an error to occur.

❌ Actual result

I get a rendering error: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.

📃 Other details

In trying to figure out the cause of this bug, I tried to lock CKEditor to v41 in package.json:

    "@ckeditor/ckeditor5-basic-styles": "41.4.2",
    "@ckeditor/ckeditor5-editor-classic": "41.4.2",
    "@ckeditor/ckeditor5-essentials": "41.4.2",
    "@ckeditor/ckeditor5-font": "41.4.2",
    "@ckeditor/ckeditor5-link": "41.4.2",
    "@ckeditor/ckeditor5-paragraph": "41.4.2",
    "@ckeditor/ckeditor5-react": "7.0.0",
    "@ckeditor/ckeditor5-theme-lark": "41.4.2",

However, when I run npm update, packages like ckeditor5-core get upgraded to v42:

     "node_modules/@ckeditor/ckeditor5-core": {
-      "version": "41.4.2",
-      "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-core/-/ckeditor5-core-41.4.2.tgz",
-      "integrity": "sha512-kCIJjviiMNIMBMx7XFXFp1IeTELQKv7xyPJiVFDyUftIfthf9uWty72ipZ3BBNBGBkaoTiSzDZ507EsX6czuIQ==",
+      "version": "42.0.0",
+      "resolved": "https://registry.npmjs.org/@ckeditor/ckeditor5-core/-/ckeditor5-core-42.0.0.tgz",
+      "integrity": "sha512-0WZTQM4JD3qobXNTPRMq0o1t+vYRWzkzX0LwoooZVn7NKIqCrYqVsTuV0xsN7qT0vdFNRvA9TYYfinw7j9Y4rw==",
       "license": "GPL-2.0-or-later",
+      "peer": true,
       "dependencies": {
-        "@ckeditor/ckeditor5-engine": "41.4.2",
-        "@ckeditor/ckeditor5-utils": "41.4.2",
+        "@ckeditor/ckeditor5-engine": "42.0.0",
+        "@ckeditor/ckeditor5-utils": "42.0.0",
+        "@ckeditor/ckeditor5-watchdog": "42.0.0",
         "lodash-es": "4.17.21"
       }

This is really annoying because it seems there is no way to pin CKEditor 5 to a known good version (v41) without listing all the deps one-by-one in package.json.


If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@ptmkenny ptmkenny added the type:bug This issue reports a buggy (incorrect) behavior. label Jun 30, 2024
@ptmkenny
Copy link
Author

ptmkenny commented Jun 30, 2024

Sorry, bad report-- this bug actually seems to be caused by ionic/stencil. Closing.

ionic-team/ionic-framework#29681

@Witoso Witoso added the resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:invalid This issue is invalid (e.g. reports a non-existent bug or a by-design behavior). type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

2 participants