Closed ryangamil closed 1 month ago
想在Next.js项目中使用编辑器,根据可视化编辑器的文档 https://github.com/aisuda/amis-editor-demo “在其他项目中使用amis-editor”章节(图1)的使用方式引入报错 1、使用npx create-next-app 创建项目后,直接引入Amis-Editor后运行报错mobx-react未找到(图2) 2、手动引入与amis相同版本的mobx-react后再运行,报错[mobx-state-tree] expected mobx-state-tree node as argument 1, got undefined instead(图3)
你是如何使用 amis 的? npm node版本18.19.1
amis 版本是什么?请先在最新 beta 版本测试问题是否存在 amis-editor版本为最新的6.8.0
粘贴有问题的完整 amis schema 代码:
amis schema
const amisJSON = { type: "page", body: "测试", title: "标题", }
操作步骤 此处提供一个rep:https://github.com/ryangamil/nextjs-amis-editor-demo 执行 npm i --legacy-peer-deps npm run dev 后可在网页中查看
const nextConfig = { reactStrictMode: false, };
在nextConfig中关闭react的严格模式可以打开了
描述问题:
想在Next.js项目中使用编辑器,根据可视化编辑器的文档 https://github.com/aisuda/amis-editor-demo “在其他项目中使用amis-editor”章节(图1)的使用方式引入报错 1、使用npx create-next-app 创建项目后,直接引入Amis-Editor后运行报错mobx-react未找到(图2) 2、手动引入与amis相同版本的mobx-react后再运行,报错[mobx-state-tree] expected mobx-state-tree node as argument 1, got undefined instead(图3)
截图或视频:
如何复现(请务必完整填写下面内容):
你是如何使用 amis 的? npm node版本18.19.1
amis 版本是什么?请先在最新 beta 版本测试问题是否存在 amis-editor版本为最新的6.8.0
粘贴有问题的完整
amis schema
代码:操作步骤 此处提供一个rep:https://github.com/ryangamil/nextjs-amis-editor-demo 执行 npm i --legacy-peer-deps npm run dev 后可在网页中查看