uiwjs / react-codemirror

CodeMirror 6 component for React. @codemirror https://uiwjs.github.io/react-codemirror/
https://uiwjs.github.io/react-codemirror/
MIT License
1.61k stars 128 forks source link

Module not found: Can't resolve 'react/jsx-runtime' in '.../node_modules/@uiw/react-codemirror/esm' #235

Open huowenxuan opened 2 years ago

huowenxuan commented 2 years ago

React version: 16.13.1

Wendel-Macedo commented 2 years ago

i'm having this problem too but is on '.../node_modules/@uiw/react-codemirror/cjs''

PS: The react-codemirror version is the 4.3.1 (the latest at this moment)

jaywcjlove commented 2 years ago

@Wendel-Macedo @huowenxuan Can you provide running examples?

e.g: https://codesandbox.io/embed/react-codemirror-example-codemirror-6-slvju?fontsize=14&hidenavigation=1&theme=dark

rajeshdh commented 2 years ago

Updating to react@latest fixed the problem for me.

jaywcjlove commented 2 years ago

@Wendel-Macedo @huowenxuan Upgrade dependency react to 6.14.0+

"dependencies": {
  "@uiw/react-codemirror": "4.3.2",
  "react": "16.14.0",
  "react-dom": "16.14.0",
  "react-scripts": "4.0.3"
},

Example: https://codesandbox.io/embed/react-codemirror-example-codemirror-6-slvju?fontsize=14&hidenavigation=1&theme=dark