I managed to make it work. Turns out the problem was due that the jql-editor depends on prosemirror and some of the jql-editor dependencies also depend on prosemirror (but different versions of it).
Having multiple versions of prosemirror was causing the error.
Adding this to the package.json
did the trick:
"resolutions": {
"prosemirror-model": "1.16.0",
"prosemirror-state": "1.3.4",
"prosemirror-transform": "1.3.2",
"prosemirror-view": "1.23.13"
}