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

[Question] How to fix "Duplicate use of selection JSON ID cell" error? #316

Closed
matticustard opened this issue May 16, 2019 · 8 comments

Comments

Projects
None yet
5 participants
@matticustard
Copy link

commented May 16, 2019

Describe the bug
As soon as I attempt to load the tiptap-extensions module using the example in the "Avaiable Extensions" section of the README, I receive the error: "Uncaught RangeError: Duplicate use of selection JSON ID cell." This is in reference to a line of code: "prosemirrorState.Selection.jsonID("cell", CellSelection);"

I'm hoping there's something simple I'm overlooking, because I can't seem to find anyone else with this issue.

Steps to Reproduce
I have installed the tiptap and tiptap-extensions modules.
I also installed the prosemirror-tables module based on NPM's insistence.

The main tiptap module works fine when I create a simple editor-content component, as in the README.

However, as soon as I attempt to load the tiptap-extensions module, I receive the error: "Uncaught RangeError: Duplicate use of selection JSON ID cell." This is in reference to a line of code somewhere that reads: "prosemirrorState.Selection.jsonID("cell", CellSelection);"

What have I done to try to fix this issue?

  • I uninstalled and reinstalled the modules.
  • I have updated all other node modules.
  • I have tried removing and recreating the node_modules folder.
  • I have tried making the editor the only defined Vue component (commented out all others temporarily).
  • I have looked online for hours for a solution, whether with tiptap or prosemirror, and have been unsuccessful.

Expected behavior
For the editor to be able to load with extensions and menu.

Environment (local)

  • Windows 10
  • Chrome
  • Version 74.0.3729.131
  • Desktop

Environment (remote)

  • CentOS 6.10
  • Laravel 5.8
  • Webpack (via Laravel Mix)

@matticustard matticustard added the bug label May 16, 2019

@Alecyrus

This comment has been minimized.

Copy link
Contributor

commented May 17, 2019

I met this error before,and fixed it by deleting node_modules and reinstalling the dependences.

@philippkuehn

This comment has been minimized.

Copy link
Contributor

commented May 17, 2019

this is a version problem. why do you installed prosemirror-tables?

@matticustard

This comment has been minimized.

Copy link
Author

commented May 17, 2019

why do you installed prosemirror-tables?

Because I received this message upon installing tiptap:

npm WARN prosemirror-utils@0.8.1 requires a peer of prosemirror-tables@^0.7.9 but none is installed. You must install peer dependencies yourself.

And if I don't install it, I get this message from webpack:

ERROR in ./node_modules/prosemirror-utils/dist/index.js
Module not found: Error: Can't resolve 'prosemirror-tables' in '/home/...
@philippkuehn

This comment has been minimized.

Copy link
Contributor

commented May 17, 2019

Hmm this is strange, because prosemirror-tables is already a dependency of tiptap-extensions.

@matticustard

This comment has been minimized.

Copy link
Author

commented May 17, 2019

Just tried installing tiptap-extensions without prosemirror-tables installed to see if it would load the dependencies as you mention it should, but it gives the same error.

npm install tiptap-extensions
npm WARN prosemirror-utils@0.8.1 requires a peer of prosemirror-tables@^0.7.9 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ tiptap-extensions@1.19.4
added 9 packages from 270 contributors and audited 29151 packages in 12.765s
@matticustard

This comment has been minimized.

Copy link
Author

commented May 17, 2019

So despite the error, it does seem to be working now. I guess I should have just ignored the warning in the first place. Thanks for your help!

@JeffersonOndzeMangha

This comment has been minimized.

Copy link

commented Jun 12, 2019

I am facing this issue, none of the above comments fixed the issue, is there a more concrete response?

@mdtomo

This comment has been minimized.

Copy link

commented Jul 1, 2019

I had the same issue. Delete your node_modules directory, package.json.lock file and remove any references to prosemirror-tables from package.json. Then npm install. That fixed my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.