This was my resolutions in package.json to help enforce the latest versions (monorepo with multiple packages that use codemirror dependencies, so root level resolutions helps prevent some of these issues):
"resolutions": {
"@codemirror/autocomplete": "^6.9.0",
"@codemirror/commands": "^6.2.4",
"@codemirror/lang-css": "^6.2.0",
"@codemirror/lang-html": "^6.4.5",
"@codemirror/lint": "^6.3.0",
"@codemirror/language": "^6.8.0",
"@codemirror/language-data": "^6.3.1",
"@codemirror/search": "^6.5.0",
"@codemirror/state": "^6.2.1",
"@codemirror/view": "^6.15.3",
}
I didn’t really have any lezer packages included here since I don’t really import and use those.
Running yarn list --pattern lezer
gave this:
Updated resolutions to:
"resolutions": {
"@codemirror/autocomplete": "^6.9.0",
"@codemirror/commands": "^6.2.4",
"@codemirror/lang-css": "^6.2.0",
"@codemirror/lang-html": "^6.4.5",
"@codemirror/lint": "^6.3.0",
"@codemirror/language": "^6.8.0",
"@codemirror/language-data": "^6.3.1",
"@codemirror/search": "^6.5.0",
"@codemirror/state": "^6.2.1",
"@codemirror/view": "^6.15.3",
"codemirror": "^6.0.1",
"@lezer/common": "^1.0.3",
"@lezer/highlight": "^1.1.6",
"@lezer/lr": "1.3.4"
}
…and ended with consistency in the lezer packages.
The issue does seem to be solved now. The out of date or mismatched @lezer/lr
versions seemed to be responsible.
Is there a better way to keep CodeMirror and Lezer packages up-to-date? It feels like a battle whenever I go to update. Forcing the latest versions with "resolutions"
was the only way I could get things working properly.