FWIW, I ran into this same issue and the fix for me was disabling dependency injection in my vite.config.js for the @lezer/highlight
package.
optimizeDeps: {
exclude: [
'codemirror',
'@codemirror/commands',
'@codemirror/language',
'@codemirror/state',
'@codemirror/view',
'@codemirror/lang-sql',
'@lezer/highlight'
]
}