Closed liutiyao closed 6 months ago
What tool is producing this error? Have you tried upgrading it?
Happened here too and compiled using react-scripts@4.0.3 and node 16. I experienced it after installing @uiw/codemirror-extensions-langs@4.21.24
Full error:
[react:testing ] Compiling...
[react:testing ] Failed to compile.
[react:testing ]
[react:testing ] ./node_modules/@lezer/yaml/dist/index.js 45:13
[react:testing ] Module parse failed: Unexpected token (45:13)
[react:testing ] File was processed with these loaders:
[react:testing ] * ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js
[react:testing ] You may need an additional loader to handle the result of these loaders.
[react:testing ] | }
[react:testing ] |
[react:testing ] > static top = new Context(null, -1, type_Top);
[react:testing ] | }
[react:testing ] |
Thank you for addressing this @marijnh 💙 forgive me for bothering you, I didn't see an updated version published in https://www.npmjs.com/package/@codemirror/lang-yaml?activeTab=versions, is there another version of one of the lezer
or codemirror
packages I should install to pick this up?
(In my case, my create-react-app complains:
/path/to/.pnpm/@codemirror+lang-yaml@6.1.1_@codemirror+view@6.26.3/node_modules/@codemirror/lang-yaml/dist/index.js
Module not found: Can't resolve '@lezer/lr' in '/path/to/.pnpm/@codemirror+lang-yaml@6.1.1_@codemirror+view@6.26.3/node_modules/@codemirror/lang-yaml/dist'
I've tagged 1.0.3
The static syntax is pretty advanced for this environment.Can @lezer/yaml be compiled when bundled into a dist file