baidu / amis

前端低代码框架,通过 JSON 配置就能生成各种页面。
https://baidu.github.io/amis/
Apache License 2.0
16.7k stars 2.44k forks source link

amis-editor-demo 使用 6.6.0版本构建,无法构建 #10608

Open atliwen opened 3 weeks ago

atliwen commented 3 weeks ago

描述问题:

amis-editor-demo 使用 6.6.0版本构建,无法构建。 已经设置extensions: ['.js', '.jsx', '.ts', '.tsx','.esm.js', '.umd.js', '.min.js', '.json', '.mjs'] node 也升级到了 20版。

截图或视频:

ERROR in ./node_modules/react-pdf/dist/esm/Document.js 22:0-48 Module not found: Error: Can't resolve 'react/jsx-runtime' in 'D:\git\amis-editor-demo-master\amis-editor-demo-master\node_modules\react-pdf\dist\esm' Did you mean 'jsx-runtime.js'? BREAKING CHANGE: The request 'react/jsx-runtime' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request. @ ./node_modules/react-pdf/dist/esm/index.js 2:0-37 13:0-128 @ ./node_modules/amis-ui/esm/components/PdfViewer.js 9:0-50 20:0-35 79:41-49 80:45-49 @ ./node_modules/amis/esm/renderers/PdfViewer.js @ ./node_modules/amis/esm/index.js 154:0-34 @ ./src/index.tsx

ERROR in ./node_modules/react-pdf/dist/esm/Message.js 1:0-48 Module not found: Error: Can't resolve 'react/jsx-runtime' in 'D:\git\amis-editor-demo-master\amis-editor-demo-master\node_modules\react-pdf\dist\esm' Did you mean 'jsx-runtime.js'? BREAKING CHANGE: The request 'react/jsx-runtime' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request. @ ./node_modules/react-pdf/dist/esm/Page.js 22:0-35 232:24-31 235:25-32 238:24-31 @ ./node_modules/react-pdf/dist/esm/index.js 4:0-29 13:0-128 @ ./node_modules/amis-ui/esm/components/PdfViewer.js 9:0-50 20:0-35 79:41-49 80:45-49 @ ./node_modules/amis/esm/renderers/PdfViewer.js @ ./node_modules/amis/esm/index.js 154:0-34 @ ./src/index.tsx

ERROR in ./node_modules/react-pdf/dist/esm/Outline.js 13:0-48 Module not found: Error: Can't resolve 'react/jsx-runtime' in 'D:\git\amis-editor-demo-master\amis-editor-demo-master\node_modules\react-pdf\dist\esm' Did you mean 'jsx-runtime.js'? BREAKING CHANGE: The request 'react/jsx-runtime' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request. @ ./node_modules/react-pdf/dist/esm/index.js 3:0-35 13:0-128 @ ./node_modules/amis-ui/esm/components/PdfViewer.js 9:0-50 20:0-35 79:41-49 80:45-49 @ ./node_modules/amis/esm/renderers/PdfViewer.js @ ./node_modules/amis/esm/index.js 154:0-34 @ ./src/index.tsx

ERROR in ./node_modules/react-pdf/dist/esm/OutlineItem.js 21:0-63 Module not found: Error: Can't resolve 'react/jsx-runtime' in 'D:\git\amis-editor-demo-master\amis-editor-demo-master\node_modules\react-pdf\dist\esm' Did you mean 'jsx-runtime.js'? BREAKING CHANGE: The request 'react/jsx-runtime' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request. @ ./node_modules/react-pdf/dist/esm/Outline.js 21:0-43 106:78-89 @ ./node_modules/react-pdf/dist/esm/index.js 3:0-35 13:0-128 @ ./node_modules/amis-ui/esm/components/PdfViewer.js 9:0-50 20:0-35 79:41-49 80:45-49 @ ./node_modules/amis/esm/renderers/PdfViewer.js @ ./node_modules/amis/esm/index.js 154:0-34 @ ./src/index.tsx

ERROR in ./node_modules/react-pdf/dist/esm/Page.js 13:0-63 Module not found: Error: Can't resolve 'react/jsx-runtime' in 'D:\git\amis-editor-demo-master\amis-editor-demo-master\node_modules\react-pdf\dist\esm' Did you mean 'jsx-runtime.js'? BREAKING CHANGE: The request 'react/jsx-runtime' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request. @ ./node_modules/react-pdf/dist/esm/index.js 4:0-29 13:0-128 @ ./node_modules/amis-ui/esm/components/PdfViewer.js 9:0-50 20:0-35 79:41-49 80:45-49 @ ./node_modules/amis/esm/renderers/PdfViewer.js @ ./node_modules/amis/esm/index.js 154:0-34 @ ./src/index.tsx

ERROR in ./node_modules/react-pdf/dist/esm/Page/AnnotationLayer.js 2:0-48 Module not found: Error: Can't resolve 'react/jsx-runtime' in 'D:\git\amis-editor-demo-master\amis-editor-demo-master\node_modules\react-pdf\dist\esm\Page' Did you mean 'jsx-runtime.js'? BREAKING CHANGE: The request 'react/jsx-runtime' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request. @ ./node_modules/react-pdf/dist/esm/Page.js 25:0-56 225:20-35 @ ./node_modules/react-pdf/dist/esm/index.js 4:0-29 13:0-128 @ ./node_modules/amis-ui/esm/components/PdfViewer.js 9:0-50 20:0-35 79:41-49 80:45-49 @ ./node_modules/amis/esm/renderers/PdfViewer.js @ ./node_modules/amis/esm/index.js 154:0-34 @ ./src/index.tsx

ERROR in ./node_modules/react-pdf/dist/esm/Page/Canvas.js 2:0-48 Module not found: Error: Can't resolve 'react/jsx-runtime' in 'D:\git\amis-editor-demo-master\amis-editor-demo-master\node_modules\react-pdf\dist\esm\Page' Did you mean 'jsx-runtime.js'? BREAKING CHANGE: The request 'react/jsx-runtime' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request. @ ./node_modules/react-pdf/dist/esm/Page.js 23:0-38 208:28-34 @ ./node_modules/react-pdf/dist/esm/index.js 4:0-29 13:0-128 @ ./node_modules/amis-ui/esm/components/PdfViewer.js 9:0-50 20:0-35 79:41-49 80:45-49 @ ./node_modules/amis/esm/renderers/PdfViewer.js @ ./node_modules/amis/esm/index.js 154:0-34 @ ./src/index.tsx

ERROR in ./node_modules/react-pdf/dist/esm/Page/TextLayer.js 2:0-48 Module not found: Error: Can't resolve 'react/jsx-runtime' in 'D:\git\amis-editor-demo-master\amis-editor-demo-master\node_modules\react-pdf\dist\esm\Page' Did you mean 'jsx-runtime.js'? BREAKING CHANGE: The request 'react/jsx-runtime' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request. @ ./node_modules/react-pdf/dist/esm/Page.js 24:0-44 215:20-29 @ ./node_modules/react-pdf/dist/esm/index.js 4:0-29 13:0-128 @ ./node_modules/amis-ui/esm/components/PdfViewer.js 9:0-50 20:0-35 79:41-49 80:45-49 @ ./node_modules/amis/esm/renderers/PdfViewer.js @ ./node_modules/amis/esm/index.js 154:0-34 @ ./src/index.tsx

ERROR in ./node_modules/react-pdf/dist/esm/StructTree.js 1:0-48 Module not found: Error: Can't resolve 'react/jsx-runtime' in 'D:\git\amis-editor-demo-master\amis-editor-demo-master\node_modules\react-pdf\dist\esm' Did you mean 'jsx-runtime.js'? BREAKING CHANGE: The request 'react/jsx-runtime' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request. @ ./node_modules/react-pdf/dist/esm/Page/Canvas.js 8:0-42 106:44-54 @ ./node_modules/react-pdf/dist/esm/Page.js 23:0-38 208:28-34 @ ./node_modules/react-pdf/dist/esm/index.js 4:0-29 13:0-128 @ ./node_modules/amis-ui/esm/components/PdfViewer.js 9:0-50 20:0-35 79:41-49 80:45-49 @ ./node_modules/amis/esm/renderers/PdfViewer.js @ ./node_modules/amis/esm/index.js 154:0-34 @ ./src/index.tsx

ERROR in ./node_modules/react-pdf/dist/esm/StructTreeItem.js 1:0-48 Module not found: Error: Can't resolve 'react/jsx-runtime' in 'D:\git\amis-editor-demo-master\amis-editor-demo-master\node_modules\react-pdf\dist\esm' Did you mean 'jsx-runtime.js'? BREAKING CHANGE: The request 'react/jsx-runtime' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request. @ ./node_modules/react-pdf/dist/esm/StructTree.js 6:0-49 76:16-30 @ ./node_modules/react-pdf/dist/esm/Page/Canvas.js 8:0-42 106:44-54 @ ./node_modules/react-pdf/dist/esm/Page.js 23:0-38 208:28-34 @ ./node_modules/react-pdf/dist/esm/index.js 4:0-29 13:0-128 @ ./node_modules/amis-ui/esm/components/PdfViewer.js 9:0-50 20:0-35 79:41-49 80:45-49 @ ./node_modules/amis/esm/renderers/PdfViewer.js @ ./node_modules/amis/esm/index.js 154:0-34 @ ./src/index.tsx

ERROR in ./node_modules/react-pdf/dist/esm/Thumbnail.js 13:0-48 Module not found: Error: Can't resolve 'react/jsx-runtime' in 'D:\git\amis-editor-demo-master\amis-editor-demo-master\node_modules\react-pdf\dist\esm' Did you mean 'jsx-runtime.js'? BREAKING CHANGE: The request 'react/jsx-runtime' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request. @ ./node_modules/react-pdf/dist/esm/index.js 5:0-39 13:0-128 @ ./node_modules/amis-ui/esm/components/PdfViewer.js 9:0-50 20:0-35 79:41-49 80:45-49 @ ./node_modules/amis/esm/renderers/PdfViewer.js @ ./node_modules/amis/esm/index.js 154:0-34 @ ./src/index.tsx

11 errors have detailed information that is not shown. Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.

如何复现(请务必完整填写下面内容):

  1. 你是如何使用 amis 的? npm

  2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在 6.6.0

  3. 粘贴有问题的完整 amis schema 代码:

    code here...
  4. 操作步骤 请简单描述一下复现的操作步骤...

atliwen commented 3 weeks ago

amis-editor-demo 能否更新一下,目前是6.0.0 。 总有bug

allenve commented 3 weeks ago

月底 6.7.0 解决

lhtuling commented 14 hours ago

amis-editor-demo 能否更新一下,目前是6.0.0 。 总有bug

推荐看下我录制的视频教程 https://www.bilibili.com/video/BV1PYe1emEiC/ 自己下载amis源码,本地编译,永远用最新版~!!

配合我自己搞的辅助工具,可以快速编辑本地json文件,效率更高! https://www.bilibili.com/video/BV1DFvre1E7X/

Amis低代码前端框架交流群【QQ1群】:717791727 Amis低代码前端框架交流群【QQ2群】:721182449