Property 'setNodeMarkup' does not exist on type 'Transaction'

I am converting Prosemirror code to TS. I have upgraded prosemirror-state, prosemirror-model, and prosemirror-view to the latest versions, but getting this issue.

Not completely sure, but I guess the reason is that prosemirror-state has an old version (probably non-TS) of prosemirror-transform (package.json)

Try clearing your package lock and reinstalling? That version range matches recent versions, so you should get one with its own type declarations, normally speaking.

1 Like

Deleting node_modules and package-lock.json and re-installing fixed the issue. Thanks!