Open arslancharyev31 opened 3 years ago
Unfortunately it's not possible to upgrade to 1.0.0-0
as it removes a number of methods for dealing with tables that this project uses. I guess that's why the dependency was removed
Unfortunately it's not possible to upgrade to
1.0.0-0
as it removes a number of methods for dealing with tables that this project uses. I guess that's why the dependency was removed
That is indeed unfortunate. I suppose at the very least it should be stated in the README that npm
is not supported for reasons that were described in my original post. At the very least it would definitely save time for future developers who are trying to install it according to the instructions but are met with really bizarre errors.
Got the same problem when trying to load this into Deno via esm.sh
We have the same problem, temporarily solved by using yarn for the deploy, ignoring the package-lock file.
Unfortunately it's not possible to upgrade to
1.0.0-0
as it removes a number of methods for dealing with tables that this project uses. I guess that's why the dependency was removed
By the way, this issue is a textbook example of what eventually happens when a project relies on transitive dependencies.
Any possible solution to this bug?
Someone would need to figure out what changed in prosemirror-transform that causes the weird behavior in newer versions.
Once that's addressed the dep locking is no longer needed
I think having a dependency on yarn over npm is not a good situation. If that is accepted as a minor evil, that should be clearly stated in the installation instructions on the readme, at least.
For anyone trying to use this from npm, the only fix right now is to add this to your package.json:
"overrides": {
"prosemirror-tables": "^1.1.1"
}
Then, delete your package-lock.json file and node_modules folder, and run npm install
.
I think having a dependency on yarn over npm is not a good situation. If that is accepted as a minor evil, that should be clearly stated in the installation instructions on the readme, at least.
For anyone trying to use this from npm, the only fix right now is to add this to your package.json:
"overrides": { "prosemirror-tables": "^1.1.1" }
Then, delete your package-lock.json file and node_modules folder, and run
npm install
.
Thanks! This worked for me. :)
rich-markdown-editor
version: 11.17.0rich-markdown-editor
defines an explicit dependency onprosemirror-tables
, which at the moment resolves to1.1.1
. However,rich-markdown-editor
also defines an explicit dependency onprosemirror-utils
, which at the moment resolves to0.9.6
. The problem is thatprosemirror-utils@0.9.6
also defines an explicit dependency onprosemirror-tables
, which resolves to0.9.5
. The following tree illustrates the resulting dependency graph:This results in
RangeError: Duplicate use of selection JSON ID cell
exception being thrown sinceprosemirror-tables
tries to define some unique element twice (correct me if I'm wrong here).And no, this is not an issue with "unique package situation", as was suggested in https://github.com/outline/rich-markdown-editor/issues/412#issuecomment-803216815. On
yarn
this issue can be somewhat mitigated through "selective dependency resolutions". (Update: I just checked, and apparently in yarn all packages resolve toprosemirror-tables@1.1.1
, hence manual resolution is not required here). Butnpm
provides no such mechanism at the moment (its counterpart,overrides
, is an approved but not yet implemented rfc). Of course one could manually edit thepackage-lock.json
to resolve it, but this is a highly suboptimal solution for self-evident reasons. Therefore, this issue has to be fixed either in upstream or in this repository.The good news is that this issue is fixed in
prosemirror-utils@1.0.0-0
, which no longer defines an explicit dependency onprosemirror-tables
, which should, in theory, fix this issue. The bad news is that1.0.0-0
is tagged as release candidate, which may or may not be acceptable to maintainers ofrich-markdown-editor
.Finally, having said all that, would you consider upgrading the problematic
prosemirror-utils
package to v1, so that npm users can userich-markdown-editor
?