codemirror / dev

Development repository for the CodeMirror editor project
https://codemirror.net/
Other
5.85k stars 371 forks source link

lang-html 6.4.6 causing crash #1272

Closed siefkenj closed 1 year ago

siefkenj commented 1 year ago

Describe the issue

Using the html() plugin from @codemirror/lang-html@6.4.6 causes the following error in my console:

Uncaught RangeError: Invalid top rule name SingleExpression

The error appears to originate from lezer.

Downgrading to @codemirror/lang-html@6.4.5 works fine.

I am using @uiw/react-codemirror 4.21.18.

Browser and platform

Firefox 118

Reproduction link

No response

marijnh commented 1 year ago

You are most likely using an ancient version of @lezer/javascript, somehow.

siefkenj commented 1 year ago

Thanks! I never installed @lezer/javascript explicitly and somehow had version 1.0 hanging around in my node_modules. Everything works now :-)