I wish to communicate to my plugin that a node has been destroyed like so:
destroy() {
    const destroyTr = this.view.state.tr
     .setMeta('action', 'destroy')
     // @ts-ignore
     .setMeta('pos', this.getPos())
     this.view.dispatch(destroyTr);
}
This however gives me the following: RangeError: Applying a mismatched transaction.
Is this spposed to work? If yes can someone guide me on how to debug this kinda error or any alternate approach.