I created this ticket as a reference for all users experiencing the following error message:
Yjs was already imported. This breaks constructor checks and will lead to issues!
Please take this seriously.
If you see this message, make sure that you only import one version of Yjs. In many cases,
your package manager installs two versions of Yjs that are used by different packages within your project.
Another reason for this message is that some parts of your project use the commonjs version of Yjs
and others use the EcmaScript version of Yjs.
This often leads to issues that are hard to debug. We often need to perform constructor checks,
e.g. struct instanceof GC. If you imported different versions of Yjs, it is impossible for us to
do the constructor checks anymore - which might break the CRDT algorithm.
I created this ticket as a reference for all users experiencing the following error message:
Please take this seriously.
If you see this message, make sure that you only import one version of Yjs. In many cases,
your package manager installs two versions of Yjs that are used by different packages within your project.
Another reason for this message is that some parts of your project use the commonjs version of Yjs
and others use the EcmaScript version of Yjs.
This often leads to issues that are hard to debug. We often need to perform constructor checks,
e.g.
struct instanceof GC. If you imported different versions of Yjs, it is impossible for us todo the constructor checks anymore - which might break the CRDT algorithm.