Currently, I'm working on a project using Nextjs/Express with TypeScript. I encountered an issue when I introduced the MDEditor component to my pages/sheets/text-editor.tsx
file:
import MDEditor from "@uiw/react-md-editor";
const TextEditor: React.FC = () => {
return (
<div>
<MDEditor />
</div>
);
};
export default TextEditor;
The error message that popped up was as follows:
./node_modules/@uiw/react-markdown-preview/lib/esm/styles/markdown.css Global CSS cannot be imported from within node_modules. Read more: https://nextjs.org/docs/messages/css-npm Location: node_modules/@uiw/react-markdown-preview/lib/esm/index.js
I suspect this may have occurred due to adding Tailwind to my project following the guidelines provided in this documentation:
https://tailwindcss.com/docs/guides/nextjs
Can someone shed some light on what exactly is happening here?