tiptap-utils depends on prosemirror-utils, but they depend on conflicting versions of prosemirror-tables

Created on 14 Jul 2020  路  2Comments  路  Source: ueberdosis/tiptap

This message has been seen often:

"Duplicate use of selection JSON ID cell"

Various purgings of node_modules and adding of explicit dependencies on prosemirror-tables 0.9.x sometimes help.

But I don't think I've seen this analysis in any of the closed threads. Maybe it can prompt discussion and a possible way forward:

  • tiptap-extensions 1.31.1 depends on prosemirror-tables ^1.1.0.
  • tiptap-extensions 1.31.1 also depends on prosemirror-utils ^0.9.6.
  • But prosemirror-utils 0.9.6 depends on prosemirror-tables ^0.9.1.
  • npm installs both in separate node_modules dirs, but convincing webpack to take the right one seems to be a whole 'nother thing.
  • Thus people purging node_modules folders and propitiating the code gods for good luck and so on 馃槅

Does tiptap-extensions really need anything that is new in prosemirror-tables 1.1.0? Or maybe prosemirror-utils is capable of using prosemirror-tables 1.1.0 if its dependency were updated? It seems like the answers are "no" and "don't know" because an explicit dependency on prosemirror-tables 0.9.6 at project level occasionally helps.

This issue would be a lot less common if tables weren't a mandatory dependency of the extensions module. Not sure if that is possible to change.

bug

Most helpful comment

Resolving it to just one version seems like incorrect behavior on yarn's part. tiptap-extensions still depends on prosemirror-utils ^0.9.6:

https://github.com/ueberdosis/tiptap/blob/master/packages/tiptap-extensions/package.json#L31

Which still depends on prosemirror-tables 0.9.1:

https://github.com/atlassian/prosemirror-utils/blob/master/package.json#L51

But to make a long story short, there is a PR on prosemirror-utils to resolve it:

https://github.com/atlassian/prosemirror-utils/pull/93

As well as a ticket:

https://github.com/atlassian/prosemirror-utils/issues/85

If you do need both prosemirror-tables 1.x and prosemirror-utils, then I see how this is an upstream problem at this point. Hopefully the PR will be accepted soon and our long intermittent nightmare will be over. 馃槅

All 2 comments

Thanks for reporting! I failed to reproduce this issue with the latest versions:

  "dependencies": {
    "tiptap": "^1.29.6",
    "tiptap-extensions": "^1.32.6",
    "vue": "^2.6.11"
  },

Yarn does this resolve to only one version for me: "prosemirror-tables@npm:^1.1.1"

Does that issue still exist? Any idea what I need to try? Closing this for now, but happy to reopen if it still needs our attention.

Resolving it to just one version seems like incorrect behavior on yarn's part. tiptap-extensions still depends on prosemirror-utils ^0.9.6:

https://github.com/ueberdosis/tiptap/blob/master/packages/tiptap-extensions/package.json#L31

Which still depends on prosemirror-tables 0.9.1:

https://github.com/atlassian/prosemirror-utils/blob/master/package.json#L51

But to make a long story short, there is a PR on prosemirror-utils to resolve it:

https://github.com/atlassian/prosemirror-utils/pull/93

As well as a ticket:

https://github.com/atlassian/prosemirror-utils/issues/85

If you do need both prosemirror-tables 1.x and prosemirror-utils, then I see how this is an upstream problem at this point. Hopefully the PR will be accepted soon and our long intermittent nightmare will be over. 馃槅

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jetacpp picture jetacpp  路  3Comments

bernhardh picture bernhardh  路  3Comments

agentq15 picture agentq15  路  3Comments

glavdir picture glavdir  路  3Comments

ageeye-cn picture ageeye-cn  路  3Comments