Error after upgrade to latest version

I have a working application with version 1.31.4.

An attempt to upgrade to the latest version 1.34.3 was not good because it nows fails to render some content in edit mode.

The error is

Uncaught TypeError: Cannot read properties of undefined (reading ‘children’) at preMatch (index.js:1996:1)

in prosemirror-view/src/viewdesc.ts at 17b508f618c944c54776f8ddac45edcb49970796 · ProseMirror/prosemirror-view · GitHub

fine is that there’s a “// FIXME” comment that’s 2 years old. I see the use of parent! with the bang sign which is wrong in this because it clearly can be undefined as the error message is saying.

Did you check whether upgrading duplicated any of the prosemirror packages in your node_modules? Yarn and old npm versions will do that, and it breaks this library. (Check npm ls -a | grep prosemirror)

1 Like