html vs javascript @codemirror/state are loaded, breaking instanceof checks.

When I import html support like this

import {EditorState, EditorView, basicSetup} from "@codemirror/basic-setup"
import {html} from "@codemirror/lang-html"
import {chroma_theme} from "./edit_theme"

let editor = new EditorView({
  state: EditorState.create({
    extensions: [basicSetup, html(), chroma_theme,]
  parent: document.querySelector("#editor")

export function getViewState() {
  return view.state.doc.text;

I get the following error

editor_bundle.js:1484 Uncaught Error: Unrecognized extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.
    at inner (editor_bundle.js:1484:15)
    at inner (editor_bundle.js:1464:9)
    at inner (editor_bundle.js:1464:9)
    at flatten (editor_bundle.js:1488:3)
    at Configuration.resolve (editor_bundle.js:1404:21)
    at EditorState.create (editor_bundle.js:1902:39)
    at new EditorView (editor_bundle.js:8210:65)
    at editor_bundle.js:32542:12

when I import lang-javascript everything works

using esbuild

I removed the package lock and reinstalled node_modules

also trying pnpm vs yarn and npm