Git Product home page Git Product logo

amis-react-starter's Issues

npm run server报错

node版本 14.18.3
日志
ERROR in ./src/App.tsx 4:0-33
Module not found: Error: Can't resolve 'amis/lib/themes/cxd.css' in '/Users/alias/workspace/lowcode/amis-react-starter/src'
@ ./src/index.tsx 3:0-24 4:36-39

ERROR in ./src/App.tsx 5:0-29
Module not found: Error: Can't resolve 'amis/lib/helper.css' in '/Users/alias/workspace/lowcode/amis-react-starter/src'
@ ./src/index.tsx 3:0-24 4:36-39

ERROR in ./src/App.tsx 6:0-31
Module not found: Error: Package path ./sdk/iconfont.css is not exported from package /Users/alias/workspace/lowcode/amis-react-starter/node_modules/amis (see exports field in /Users/alias/workspace/lowcode/amis-react-starter/node_modules/amis/package.json)
@ ./src/index.tsx 3:0-24 4:36-39

vite下使用editor会报错

  {
    type: 'page',
    body: {
      type: 'form',
      api: '/api/form',
      body: [
        {
          type: 'input-text',
          name: 'name',
          label: '姓名:'
        },
        {
          name: 'email',
          type: 'input-email',
          label: '邮箱:'
        },
        {
          type: 'editor',
          name: 'editor',
          label: '编辑器'
        }
      ]
    }
  }

报错信息:

chunk-ACCAMVX6.js?v=6b5862ce:12 Uncaught (in promise) Error: Dynamic require of "monaco-editor" is not supported
at chunk-ACCAMVX6.js?v=6b5862ce:12:9
at Editor.js:139:83
at new Promise ()
at Editor.js:139:53

使用app多页应用配置文件,二级页面路径跳转不了(找不到路径)

配置使用的是amis-admin-master项目的配置:
如下:
{
"status": 0,
"msg": "",
"data": {
"pages": [
{
"label": "Home",
"url": "/",
"redirect": "/index/1"
},
{
"label": "示例",
"children": [
{
"label": "页面A",
"url": "index",
"schema": {
"type": "page",
"title": "页面A",
"body": "页面A"
},
"children": [
{
"label": "页面A-1",
"url": "1",
"schema": {
"type": "page",
"title": "页面A-1",
"body": "页面A-1"
}
},
{
"label": "页面A-2",
"url": "2",
"schema": {
"type": "page",
"title": "页面A-2",
"body": "页面A-2"
}
},
{
"label": "页面A-3",
"url": "3",
"schema": {
"type": "page",
"title": "页面A-3",
"body": "页面A-3"
}
}
]
},
{
"label": "页面B",
"schema": {
"type": "page",
"title": "页面B",
"body": "页面B"
}
},
{
"label": "页面C",
"schema": {
"type": "page",
"title": "页面C",
"body": "页面C"
}
},
{
"label": "列表示例",
"url": "/crud",
"rewrite": "/crud/list",
"icon": "fa fa-cube",
"children": [
{
"label": "列表",
"url": "/crud/list",
"icon": "fa fa-list",
"schemaApi": "get:/pages/crud-list.json"
},
{
"label": "新增",
"url": "/crud/new",
"icon": "fa fa-plus",
"schemaApi": "get:/pages/crud-new.json"
},
{
"label": "查看",
"url": "/crud/:id",
"schemaApi": "get:/pages/crud-view.json"
},
{
"label": "修改",
"url": "/crud/:id/edit",
"schemaApi": "get:/pages/crud-edit.json"
}
]
}
]
},
{
"label": "分组2",
"children": [
{
"label": "用户管理",
"schema": {
"type": "page",
"title": "用户管理",
"body": "页面C"
}
},
{
"label": "外部链接",
"link": "http://baidu.gitee.io/amis"
},
{
"label": "部门管理",
"schemaApi": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/service/form?tpl=tpl3"
},
{
"label": "jsonp 返回示例",
"schemaApi": "jsonp:/pages/jsonp.js?callback=jsonpCallback"
}
]
}
]
}
}

使用vite无法启动服务

尝试运行npm run vite,但是得到以下错误信息:

image

猜测可能是因为amis的lib文件夹下将source map文件也打包进去了,从而无法通过vite检查??

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.