aisuda / amis-react-starter Goto Github PK
View Code? Open in Web Editor NEWamis react 初始项目示例
License: Apache License 2.0
amis react 初始项目示例
License: Apache License 2.0
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
想请教一下 能不能升级到 react18 能不能给自己搭建的教程~~谢谢
配置使用的是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"
}
]
}
]
}
}
{
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
已经跑不起来了
居然不提交 pnpm-lock.yaml 文件,报错问题很多
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.