Module Not Found Error

If you are trying to install CodeMirror version 5, you should use the command

npm i codemirror@version5

because react-codemirror-2 only supports "codemirror": "5.x".

Also you can try @codemirror-toolkit/react, which supports version 6 and React above v16.8.0.

2 Likes