Any experience with pm+vitest? ("Adding different instances of a keyed plugin")

Anyone using vitest? (it runs my test suite /dramatically/ faster, btw)

On my first test run, I get a bunch of failures with the PM error “Adding different instances of a keyed plugin”. Oddly, if I re-run the tests they pass without this error.

I’ve checked that I don’t have multiple versions of prosemirror-state installed, and I’ve tried this suggestion:

Any ideas?

Thanks

Also struggling due to duplicated prosemirror-model. So far, I haven’t been successful in trying to find a config that would fix that problem.

Please check your lock file (e.g., yarn.lock, pnpm-lock.yaml) and ensure that you only have one version of prosemirror-model installed. Commands like npm dedupe and pnpm dedupe will be helpful.

I found it useful to open the lock file, search for “prosemirror” and delete every reference. Then npm install or whatever.