@codemirror/lang-javascript not found

<script setup>
//these work
import {basicSetup, EditorView} from 'codemirror';
import {EditorState, Compartment} from "@codemirror/state"
import {keymap} from "@codemirror/view"
import {defaultKeymap,indentWithTab} from "@codemirror/commands"
import {language} from "@codemirror/language"

all of the above import fine, however,

//this does not work
import {javascript} from "@codemirror/lang-javascript"

is not found.

CodeMirror is working properly on the page. I’m not sure what version I’m using, I just did npm install codemirror (about a month ago).

Many thanks.

You’ll have to npm install @codemirror/lang-javascript as well.

1 Like

thanks so much!