uiwjs / uiwjs/react-codemirror

CodeMirror plugin crashed - tags is not iterable

Open
#577 6 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
161
PR merge metrics
No merged PRs in 30d

Description

CodeMirror plugin crashed: TypeError: tags is not iterable

maybe related to @lezer

Check if there were any 0.x versions of @codemirror of @lezer
packages kept back. This error occurs when mixing pre-6.0 and post-6.0 versions (1.0 for @lezer).

highlight colors are gray all time

version 4.21.15
node v18.18.0

import { langs } from '@uiw/codemirror-extensions-langs'
import { material } from '@uiw/codemirror-theme-material'
import CodeMirror from '@uiw/react-codemirror'
.
.
.
   
 <CodeMirror
      readOnly={readOnly}
      width="100%"
      height={height}
      theme={material}
      onChange={onChange}
      value={value} 
      extensions={[langs[extensions]()]} // javascript
      onBlur={onBlur}
      basicSetup={{
        highlightActiveLine: false,
        highlightActiveLineGutter: false,
      }}
  />
Screenshot 2023-09-22 at 12 03 31

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the TypeError with the supplied React/JSX example using version 4.21.15 and Node v18.18.0. Inspect the @codemirror and @lezer package versions and the langsextensions entry point; done means the example no longer throws and syntax highlighting is restored.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, react, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.