If I upgrade to the latest versions of the core modules, I end up with multiple versions of some of the modules installed, because some of the cross-module dependencies are still pointing to older versions.
This can cause problems e.g. with instanceof tests.
What’s the advice for being on the latest versions? I think I could use resolutions in package.json to force only the latest version?
For now I’ve downgraded to the latest versions which align with the cross-module deps.
The versions are all compatible, using ^ version ranges. So I feel “because npm upgrade is rather broken” is a more apt root cause than “because ProseMirror doesn’t re-release every single package with new dependency versions whenever one of the packages get a new release”.
The usual fix is to remove your package lock and reinstall. npm manages to deduplicate properly on reinstalling.
I’m on yarn 2 and this didn’t work when I tried it. I got a message “dedupe is not necessary, yarn install dedupes automatically”
What did work was manually pinning the versions of the modules that ended up with multiple installs, using "resolutions" in package.json. At the time I’m posting, these are the resolutions you need to get one version of each package