Open hugorut opened 6 months ago
Possibly related:
https://github.com/ueberdosis/tiptap/issues/3838
https://github.com/ueberdosis/tiptap/issues/4616
https://github.com/ueberdosis/tiptap/issues/3869
Even with PNPM overrides like this:
{
"name": "rhino-editor",
"dependencies": {
"prosemirror-view": "^1.34.3"
},
"pnpm": {
"overrides": {
"prosemirror-view": "$prosemirror-view"
}
}
}
and then in the dependency project I have the same setup.
{
"name": "rails-editor",
"dependencies": {
"rhino-editor": "link:../"
"prosemirror-view": "^1.34.3"
},
"pnpm": {
"overrides": {
"prosemirror-view": "$prosemirror-view"
}
}
}
And I checked all the prosemirror-view
packages, and they're all the same.
And in the child project:
And im on ^2.8.0
for all TipTap packages.
The only thing I can guess is maybe something is bundling it on accident?
Anyways, here's what's currently working for me:
{
"dependencies": {
"prosemirror-view": "~1.28.0"
},
"pnpm": {
"overrides": {
"prosemirror-view": "$prosemirror-view"
}
}
}
I have a reproduction available, but the setup is a little convoluted since its using Rails.
I'll see if I can put together a proper minimal reproduction as this has been plaguing me for quite a while.
Reproduction:
https://codepen.io/paramagicdev/pen/ZEgWGXr
Interestingly, you can trigger it by downgrading the lowlight extension to 2.7.0
and you can see in the network tab prosemirror-view
is loaded 3 times.
What's even more fascinating is in this codepen with everything at 2.8.0
, it works as expected. But it still loads prosemirror-view
twice 🤔
https://codepen.io/paramagicdev/pen/poMyJWW
For some reason that doesn't break it.
Which packages did you experience the bug in?
extension-code-block-lowlight,core
What Tiptap version are you using?
3.1.0
What’s the bug you are facing?
When using tiptap
Editor
andCodeBlockLowlight
I am unable to render the editor as theinnerDeco
seems to have twomembers
which areundefined
. This causes theDecoraterGroup.locals
function to blow up as it callswhere
this.members[i]
is sometimes undefined.I have not found why this occurs at the moment, but some replicable code to produce the error is attached below.
Other replies to similar issues mentioned that this might be a prosemiror view version mismatch, but I cannot see this from the various extension package.jsons
What browser are you using?
Firefox
Code example
whereas if I pin the version to 2.2.3 the example is rendered correctly, e.g:
What did you expect to happen?
I expected the editor to be rendered.
Anything to add? (optional)
No response
Did you update your dependencies?
Are you sponsoring us?