Error: Looks like multiple versions of prosemirror-model were loaded

See original GitHub issue

Describe the bug When using the editor (e.g. using ENTER key) it’s not working, and we got error in the console:

Can not convert <> to a Fragment (looks like multiple versions of prosemirror-model were loaded)

Due to prosemirror-model@1.8.2 and prosemirror-model@1.9.0 loaded simultaneously.

tiptap-extensions package requires strictly version 1.8.2 and other packages prosemirror-model@^1.0.0, prosemirror-model@^1.1.0, prosemirror-model@^1.8.1 which resolves to 1.9.0

Steps to Reproduce / Codesandbox Example Steps to reproduce the behaviour:

  1. install
"tiptap": "^1.27.1",
"tiptap-extensions": "^1.29.1"

with Yarn. This will install prosemirror-model@1.8.2 and prosemirror-model@1.9.1.

  1. When using the editor (e.g. using ENTER key) it’s not working, and we got error in the console

Expected behaviour Editor should work, there should be only one prosemirror-model package installed.

Quick and dirty workaround for users (it’s not proper fix!) - use resolutions entry in package.json:

    "resolutions": {
        "prosemirror-model": "1.9.1"
    }

Then remove node_modules, yarn.lock and install packages again.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:147
  • Comments:111 (15 by maintainers)

github_iconTop GitHub Comments

19reactions
jakedolancommented, Mar 18, 2020

RangeError: Adding different instances of a keyed plugin (plugin$)

I was just writing up a issue for this error. prosemirror-state released 1.3.3 earlier today so a clean install with “tiptap”: “1.26.6” and “tiptap-extensions”: “1.28.6” would throw the above error.

Adding the following to my package.json file did fix the issues on a clean install:

"resolutions": {
    "prosemirror-model": "1.8.2",
    "prosemirror-state": "1.3.2"
  }

But it may be worth adding the other prosemirror packages to avoid similar conflicts in the future as @paramono suggests.

Can this be addressed through tiptap to avoid these types of conflicts?

11reactions
ilicmarkocommented, Nov 27, 2020

@philippkuehn Do we know when the fix will be released for this? It is breaking the current TipTap.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prosemirror-markdown with custom schema
When I am typing I see the error below looks like multiple versions of prosemirror-model were loaded. However, if I use defaultMarkdownParser ...
Read more >
prosemirror-model - npm
Start using prosemirror-model in your project by running `npm i prosemirror-model`. There are 578 other projects in the npm registry using ...
Read more >
New prosemirror.model lib (1.18.1) causes error in console
I'm rather new to React and now trying to fix an error that occurs at runtime due to a new version of prosemirror.model...
Read more >
Looks like multiple versions of prosemirror-model were loaded
Error : Looks like multiple versions of prosemirror-model were loaded.
Read more >
How to use the prosemirror-model.Slice function in ... - Snyk
To help you get started, we've selected a few prosemirror-model examples, based on popular ways it is used in public projects. Secure your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found