For developers who faced the same issue as me:
If you see this error message and you're using Next.js v13, please follow these steps to solve the problem:
Step 1: Install the package
npm i @uiw/react-textarea-code-editor
Step 2: Import the CSS
Add import '@uiw/react-textarea-code-editor/dist.css'; to your _app.page.jsx (or tsx)
Step3. Dynamically import the CodeEditor component
import dynamic from 'next/dynamic';
const CodeEditor = dynamic(() => import('@uiw/react-textarea-code-editor/cjs').then((mod) => mod.default), {
ssr: false,
});
I hope these steps help you solve the issue!
For developers who faced the same issue as me:
If you see this error message and you're using Next.js v13, please follow these steps to solve the problem:
Step 1: Install the package
npm i @uiw/react-textarea-code-editorStep 2: Import the CSS
Add
import '@uiw/react-textarea-code-editor/dist.css';to your _app.page.jsx (or tsx)Step3. Dynamically import the CodeEditor component
I hope these steps help you solve the issue!