0

I try to use @uiw/react-md-editor for markdown editor on NextJS 13. But I got this error

enter image description here

This is my code on editor.tsx

const MDEditor = dynamic<MDEditorProps>(() => import('@uiw/react-md-editor'), {
  ssr: false,
});

export const BlogList = (props: BlogListProps) => {
  const { heading, listContents, data } = props;
  const styles = useStyles();

  return (
    <div>
      <MDEditor value={data} height={700} />
    </div>
  );
};

And I have next.config.ts

const { withNx } = require('@nrwl/next/plugins/with-nx');
const removeImports = require('next-remove-imports')();
/**
 * @type {import('@nrwl/next/plugins/with-nx').WithNxOptions}
 **/
const nextConfig = removeImports({
  nx: {
    // Set this to true if you would like to use SVGR
    // See: https://github.com/gregberge/svgr
    svgr: false,
  },
  experimental: {
    appDir: true,
  },
});

module.exports = withNx(nextConfig);

Hope you can help me to resolve this issue

user7247147
  • 1,045
  • 1
  • 10
  • 24
Nelson Vu
  • 1
  • 1

1 Answers1

0

I don't think you have the react-markdown package installed.