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

[Bug]: RangeError: Adding different instances of a keyed plugin (plugin$) #4683

Open
1 of 2 tasks
borstessi opened this issue Dec 11, 2023 · 4 comments
Open
1 of 2 tasks
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@borstessi
Copy link

borstessi commented Dec 11, 2023

Which packages did you experience the bug in?

starter-kit, react, pm

What Tiptap version are you using?

2.1.13

What’s the bug you are facing?

On opening a page where the tip tap editor is used, i recieve the following error:

Bildschirmfoto 2023-12-11 um 11 37 32


import { useEditor, EditorContent } from '@tiptap/react';
import StarterKit from '@tiptap/starter-kit';

const Tiptap = () => {
  const editor = useEditor({
    extensions: [
      StarterKit.configure({
        gapcursor: false,
        dropcursor: false,
      }),
    ],
    content: '<p>Hello World! 🌎️</p>',
  });

  return <EditorContent editor={editor} />;
};

export default Tiptap;

is the example code

What browser are you using?

Chrome

Code example

No response

What did you expect to happen?

Basic example of tiptap editor should be rendered

Anything to add? (optional)

No response

Did you update your dependencies?

  • Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • Yes, I’m a sponsor. 💖
@borstessi borstessi added Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Dec 11, 2023
@github-project-automation github-project-automation bot moved this to Triage open in Tiptap Dec 11, 2023
@bdbch
Copy link
Member

bdbch commented Dec 11, 2023

Could you try to find out which key is trying to be instanced before this error is caught? For example via the browser debugger.

@borstessi
Copy link
Author

Bildschirmfoto 2023-12-12 um 10 15 43

Bildschirmfoto 2023-12-12 um 10 15 39

Bildschirmfoto 2023-12-12 um 10 15 54

Thats all i can get out of the debugger. Looks like there is a plugin with the key "plugin$". Anyone understands this?

@Nantris
Copy link
Contributor

Nantris commented Dec 12, 2023

Same problem started here today on 2.2.0-rc.7 which was previously working fine. I can't find any changes at all. I tried clearing node_modules and all caches but the issue persists.

It only affects two of our plugins which are used inside of a codeblock that we .extend() and then .configure()

It only affects those two plugins (out of 190 plugins), and it affects them whether they have keys or not.

It does not affect the plugins if I make them functions like const MyPlugin = () => new Plugin({}) and then use MyPlugin() to invoke it - but like I said this just started out of the blue for these two plugins which is extremely strange and a bit concerning since it occurred without any apparent changes to anything.

Downgrading to 2.1.12 fixes it for us (even though 2.2.0-rc.7 previously worked and nothing seems to have changed).


Edit: 2.1.13 does not have this problem for us (but we're not using StarterKit)

@Nantris
Copy link
Contributor

Nantris commented Dec 16, 2023

Filed #4704 for our case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
No open projects
Status: Triage open
Development

No branches or pull requests

4 participants