Skip to content

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

Open
@zeleniucvladislav

Description

@zeleniucvladislav

Have this issue when passing css() extension for CodeMirror from here : https://www.npmjs.com/package/@codemirror/lang-css. This issue is not happening when downgrading to @uiw/react-codemirror 4.8.1. I also need @uiw/codemirror-themes package and it gives same unrecognized extension value error when using with an old version. I found this @uiw/codemirror-extensions-langs package that works fine but it's size is very big and I need only certain things from there. Is there any solution to use @codemirror/lang-* packages with latest version of @uiw/react-codemirror ?

Unfortunately I couldn't replicate that issue in sandbox as an example
@codemirror/state/dist/index.cjs logs

Old version

Screenshot from 2023-03-27 15-05-49

New version

Screenshot from 2023-03-27 15-10-07

npm ls @codemirror/state gives same versions

image

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