Hi, I am getting the below error in NextJs. I have tried downgrading the version but it is not getting resolved. Please help! The versions I have tried - v7.2.1 (latest) v7.1.0 v7.0.0 v6.0.1 ``` Unhandled Runtime Error TypeError: cm is not a function Call Stack Controlled.componentDidMount node_modules\react-codemirror2\index.js (498:0) commitLayoutEffectOnFiber node_modules\react-dom\cjs\react-dom.development.js (23305:0) commitLayoutMountEffects_complete node_modules\react-dom\cjs\react-dom.development.js (24688:0) commitLayoutEffects_begin node_modules\react-dom\cjs\react-dom.development.js (24674:0) commitLayoutEffects node_modules\react-dom\cjs\react-dom.development.js (24612:0) ```
Activity
bursonyang commentedon Mar 14, 2023
I have the same problem.
shmjiao commentedon Mar 31, 2023
I encountered this problem on react18. When react17 was executed, no error was reported, is also nextjs.
ruanjiayou commentedon Apr 13, 2023
i saw this on error page
filip-savic-bm commentedon Apr 22, 2024
solution - get codemirror@5
I had same problem:
"react-codemirror2": "^8.0.0",
"react": "^18.2.0",
"codemirror": "^6.0.1",
Error goes away when i uninstall install codemirror and install codemirror@5 -- which gets me to
"codemirror": "^5.65.16"yunseop-dev commentedon Apr 29, 2025
@filip-savic-bm thanks, it helps me!