Open Vasu7389 opened 1 year ago
I have the same problem.
Uncaught TypeError: cm is not a function
I encountered this problem on react18. When react17 was executed, no error was reported, is also nextjs.
i saw this on error page
var React = require('react');
var SERVER_RENDERED = typeof navigator === 'undefined' || global['PREVENT_CODEMIRROR_RENDER'] === true;
var cm;
if (!SERVER_RENDERED) {
cm = require('codemirror');
}
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"
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