Just had this, the resolution for me was that i had codemirror@6 and @codemirror/basic-setup@0.20.0 installed at the same time, removing @codemirror/basic-setup@0.20.0 fixed it
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'
]
}
How to fix this error
“tags is not iterable”
It’s exhausting. Every version update (even minor) breaks it.
That’s on your package installation tool though, not CodeMirror.
It was indeed. It was not obvious from the error message neither there was any indication on how to fix this beyond trying some random different configs.