Skip to content

Multiple instances of @codemirror/state are loaded #183

@raymondKelly

Description

@raymondKelly

When running the latest version of JDM editor (1.42.0), if I add a decision table, i get the following error:

Unexpected Application Error!
Unrecognized extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.
Error: Unrecognized extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.

Checking my yarn lock file, it appears that there are multiple @codemirror/state versions being used. I checked in the package.json of jdm-editor https://github.com/gorules/jdm-editor/blob/master/packages/jdm-editor/package.json#L42 and it seems that there are multiple versions of different codemirror packages, under the hood, i think each of these packages is using different versions of @codemirror/state and so there are multiple instances of state. To resolve this in my setup with Vite I added

    resolve: {
      dedupe: ['@codemirror/state']
    },

However, I think the correct fix is to update the JDM Editor Codemirror packages to the same version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions