我尝试在NextJS 13上使用@uiw/react-md-editor作为markdown编辑器。但我得到了这个错误
这是我在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>
);
};
我有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);
希望你能帮我解决这个问题
1条答案
按热度按时间shyt4zoc1#
我认为你没有安装react-markdown包。