Code Monkey home page Code Monkey logo

ovine's Introduction

ovine由于存在设计缺陷不再更新了。 新版会在 ovine-next 中重写,感谢大家支持。

Ovine

download version node license

Ovine 支持使用 Json 构建完整的管理系统界面。

功能

    • 基于 bootstrap
    • 基于 typescript 代码开发友好
    • 支持 json 配置渲染逻辑复杂的表单或页面,该功能十分强大
    • 拥有齐全的 admin 组件库,完全满足一般管理系统需求
    • 该框架已经广泛应用于企业级项目中,经得起实践的考验
    • 百度 FEX 团队更新频率高 (约两个月发布一个线上版本,平均每天 5 个代码提交)
      • 需求、功能升级、BUG、优化 等都有保障
      • 中文文档且文档内容较为齐全
    • 基于 amis 二次开发,拥有其所有优势
    • 支持生成自定义 amis 主题
    • 基于 webpack 打包,简单、速度快、支持热更新
    • 通用基本功能,开箱即用
      • 路由、权限、页面、组件 都由 json 配置,可简单、快速的生成复杂的 curd 表单或页面
      • 内置企业级权限管理完整实现,并集成到 json 配置中
        • 支持权限依赖、自定义设置权限、定义好权限后,可控制任何节点
      • 路由懒加载、配合 webpack dll,页面加载速度快
    • 强大的 mock 方案,实现脱离后端开发,轻松对接

项目演示 [预览]

个性化主题

个性化主题

JSON 配置 路由、页面、Form、组件

JSON 配置

强大权限管理 (集成在配置中,无需开发)

权限管理

Ovine 适合谁?

  • 适合企业内部运营管理后台
  • 适合需要强大权限管理的后台
  • 适合成百上千个 crud 操作的后台
  • 适合对自定义 UI 要求不是极其高的后台
  • 适合喜欢偷懒的前端开发
  • 适合喜欢钻研的后端开发
  • 适合外包项目、私活
  • 最后,我希望它适合你,节约你宝贵的时间 ^_^ ~

TODO

  • 第一阶段

    • 提供完整的基础项目模板,做到上手即用
    • 构建完整 DEMO 应用,实现管理后台基础功能
    • 持续修复现存 BUG
    • 完善的开发文档
  • 第二阶段

    • 开发 UI 界面编辑器
    • 读取 API 数据渲染应用
  • 第三阶段

    • 组件插件体系

期待你的 PR,支持开源 ^_^

资源

ovine's People

Contributors

bemxself avatar chenchi2038 avatar dependabot[bot] avatar fangyang921017 avatar flexiron avatar hectorqin avatar jinmingpang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ovine's Issues

路由到具体页面时如何接收参数?

路由中配置如下“启动应用”处:
{
label: 'DEMO应用',
icon: 'fa fa-paint-brush',
nodePath: 'application',
children: [
{
label: '热更新管理',
nodePath: 'hot', // 对应 src/pages/application/hot
},
{
label: '文档管理',
nodePath: 'doc', // 对应 src/pages/application/doc
},
{
label: '启动应用',
appcode: 'demo/demo1',
nodePath: 'startapp', // 对应 src/pages/application/startapp
},
],
},

比如我想在startapp页面获取到appcode值,需要怎么处理,谢谢

配置路由不生效,请教

参考教程https://ovine.igroupes.com/org/docs/guides/start
安装了demo,测试修改路由,增加了自己的路由
{ label: 'DEMO应用', icon: 'fa fa-paint-brush', nodePath: 'application', children: [ { label: '热更新管理', nodePath: 'hot', // 对应 src/pages/application/hot }, { label: '文档管理', nodePath: 'doc', // 对应 src/pages/application/doc }, { label: '天马', nodePath: 'pegasus', // 对应 src/pages/application/doc }, ], },
在pages的application目录下增加了pegasus文件夹,拷贝了hot的index.js等3个文件进去
运行的yarn ovine dev命令
刷新却找不到自己的路由,在demo下还是只有热更新管理和文档管理两个导航,不知道什么原因,求助作者或者各位大佬!

在crud里,批量的API获取expired是失去功能

缓存功能是有效的,但在crud的table里,如果每一行都要用API获取数据的话, 就会并发,缓存就等于没有了.
比如: 使用了CRUD里columns使用quickEdit, 然后type= select使用了source. 所有source获取会由于并发一起触发了,但这时还没缓存,所以最终都真实调用API了.
而AMIS官方的案例是解决了这个问题的,如: https://baidu.gitee.io/amis/docs/types/api?page=1#%E9%85%8D%E7%BD%AE%E6%8E%A5%E5%8F%A3%E7%BC%93%E5%AD%98

按照操作步骤执行 报Module not found: Can't resolve 'react-dom'

操作步骤

npx @ovine/init init my-app
cd ./my-app
yarn install
yarn dev

执行结果

(dinobot)  ~/Documents/code/practice/_ovine/my-app  yarn dev
yarn run v1.22.4
$ ovine dev --no-dll --mock

Starting the development server...

✖ Ovine-Dev
  Compiled with some errors in 26.85s

ℹ 「wds」: Project is running at http://localhost:7050/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /Users/zhangyu/Documents/code/practice/_ovine/my-app
ℹ 「wds」: 404s will fallback to /index.html

url: http://localhost:7050/
env: localhost
mock: true



./node_modules/@ovine/core/lib/app/app.js
Module not found: Can't resolve 'react-dom' in '/Users/zhangyu/Documents/code/practice/_ovine/my-app/node_modules/@ovine/core/lib/app'


./node_modules/amis/lib/components/DateRangePicker.js
Module not found: Can't resolve 'react-dom' in '/Users/zhangyu/Documents/code/practice/_ovine/my-app/node_modules/amis/lib/components'


./node_modules/amis/lib/components/Select.js
Module not found: Can't resolve 'react-dom' in '/Users/zhangyu/Documents/code/practice/_ovine/my-app/node_modules/amis/lib/components'

node 的版本是 v10.15.0

子集不可见菜单,交互展示有问题

问题描述:

关于路由那一块,列表路由下面有一个详情页面,详情页的路由不会再左侧菜单显示,而且打开详情页面,左侧菜单打开的位置是列表页面。

{6NR(WMEIBLZOT MO44$%$N

0FGM67RRZ)5U26D@OGXST40

期望结果:

嗯,就是列表主页面下面有子集菜单,

  1. 左侧菜单不需要展示,
  2. 点击子集菜单【例如详情页面】,菜单展示定位到列表页面

关于原使用 amis jssdk模式开发的 json,如何转为 ovine 的 js 模式?

感谢官方提供的 ovine框架,这是一个很棒的专案。
参考官网手册改写原本的 json为 index.js 后,不知道如何修改 api 段的程序,我对前端只有基本概念,主要是后端开发,请问是否有相关文档或说明,如果能有一个简单的范例就更好了。

image

/* 以下是修改后的程序 /
export const schema = {
title: "分院維護",
type: "page",
body: {
type: "crud",
api: {
method: "post",
url: "http://x.x.x.x:5050/xapi/v2/zenBusiness/orm_api/3/",
data: {
page: "${page}",
perPage: "${perPage}",
id: "${id}",
field: "${field}",
keywords: "${keywords}",
_$_tableName: "zen_fields",
_$_pk: "fieldid",
_$_action: "P",
_$_query_filter: "1^10^fieldid^
^^^functiontag,tablename,fieldname",
},
dataType: "form",
},
syncLocation: false,
perPage: 10,
headerToolbar: [
{
type: "search-box",
name: "keywords",
align: "left",
placeholder: "关键字检索",
},
{
type: "columns-toggler",
align: "right",
},
{
type: "drag-toggler",
align: "right",
},
{
type: "pagination",
align: "right",
},
],
columns: [
{
name: "id",
label: "分院代號",
width: 20,
sortable: true,
type: "text",
},
{
name: "Category",
label: "分院類別",
width: 20,
sortable: false,
type: "text",
},
{
name: "CName",
label: "分院全稱",
width: 120,
sortable: false,
type: "text",
},
{
name: "NickName",
label: "簡稱",
width: 60,
sortable: true,
type: "text",
},
{
name: "Addr",
label: "分院地址",
width: 300,
sortable: false,
type: "text",
},
{
type: "operation",
label: "操作",
width: 100,
buttons: [
{
type: "button",
icon: "fa fa-times text-danger",
actionType: "ajax",
tooltip: "删除",
confirmText: "您确认要删除?",
api: {
method: "post",
url: "http://x.x.x.x:5050/xapi/v2/zenBusiness/orm_api/2/",
dataType: "form",
requestAdaptor:
'return {\n ...api,\n data: {\n ...api.data,\n _$_tableName: "clinic",\n _$_pk: "id",\n _$_action: "D"}\n}',
},
},
],
},
],
},
};

前端界面是否考虑过模块化

比如说,系统总共有100个功能,每个功能前端程序放到不同的目录下。

发布时,不同客户要求部署不同的模块,打包是直接排除功能对应的目录即可。

是否能支持?

windows环境下build失败

website/example下yarn build打包,经过测试mac系统成功打包dist,但在window10系统中(已使用cygwin适配UNIX命令),build失败,报如下错误:
VQ1)2D{)H`771I$RLKIG_YI

编辑器是基于amis-editor的吗

编辑器是基于amis-editor的吗,看到源码里作者有写到编辑器要加一些自定义组件进去,这个打算怎么实现(amis-editor没有开源)

使用 Ovine 生成器 和 命令行生成均启动失败

Ovine 生成器的配置

模板:demo/basic 均有尝试
选择版本:0.1.5/0.1.6 均有尝试
Typescript:不使用
Eslint:使用

后续命令:

yarn install
yarn start

命令行启动

按照 官方文档 操作
image

结果

在命令行中均无报错,但是使用浏览器打开时,浏览器控制台存在报错,页面空白

image

建议菜单和路由分开配置

目前看来demo的配置是根据路由配置生成菜单栏,这样是不是太耦合了,我想让不在一个路由下面的页面在菜单那里显示在一起感觉很难实现

编译出来的dist目录太大,有50M

我是根据快速开始"npx @ovine/init@^0.1.0 init my-app"创建项目安装依赖后,运行 npm run build
生成的dist有50M多~生产下这么大无法很难投入使用,0.1.3和0.1.4-alpha都试过
其中最大是 dist/chunks/app_vendor_1de5a3.js 占12M ,对应的app_vendor_1de5a3.js.map 14M.

我从网站的案例项目 http://ovine.igroupes.com/demo/login 中抓包,发现这个在线演示的chunks/app_vendor_xxx.js才几百k
请问怎样才能把编译出来的dist变成这样小?

dev:demo 运行报错

/mnt/d/oode/ovine/packages/core/lib/styled/theme.js
Module not found: Can't resolve '@generated/styles/themes' in '/mnt/d/oode/ovine/packages/core/lib/styled'
/mnt/d/oode/ovine/website/example/node_modules/@ovine/cli/lib/webpack/base.js:434
var themes = cssAssets.map(function (i) { return "" + publicPath + i; });
^

TypeError: cssAssets.map is not a function
at getThemeScript (/mnt/d/oode/ovine/website/example/node_modules/@ovine/cli/lib/webpack/base.js:434:28)
at getThemeScript (/mnt/d/oode/ovine/website/example/node_modules/@ovine/cli/lib/webpack/base.js:363:62)
at /mnt/d/oode/ovine/website/example/node_modules/@ovine/cli/lib/webpack/plugins/html_hooks_plugin.js:40:11
at Immediate. (/mnt/d/oode/ovine/node_modules/memory-fs/lib/MemoryFileSystem.js:309:4)
at processImmediate (internal/timers.js:456:21)
error Command failed with exit code 1.

post 数据没有处理,传给后台参数为{}

login 的时候yarn dev 处理后的请求对象

{
actionAddr: "POST user/login"
api: "POST user/login"
body: "{"remember":true,"username":"libaozhong","password":"yyaaf1314","code":"wqeqwe"}"
config: {method: "post", successMessage: "保存成功", errorMessage: "保存失败", onSuccess: ƒ}
data: {remember: true, username: "libaozhong", password: "yyaaf1314", code: "wqeqwe"}
fetchOptions: {credentials: "include"}
headers: {Content-Type: "application/json", X-ACTION-ADDR: "POST user/login"}
isEnvFetcher: true
mappingData: {}
method: "POST"
mock: true
onError: () => {}
onSuccess: source => {}
rawData: {remember: true, username: "libaozhong", password: "yyaaf1314", code: "wqeqwe"}
signal: null
url: "http://121.89.194.107:8081/rtapi/user/login"
}

可以看到 rawData ,body都有数据
但是yarn build的代码

{
actionAddr: "POST user/login"
api: "POST user/login"
body: "{}"
config: {}
data: {}
fetchOptions: {credentials: "include"}
headers: {Content-Type: "application/json", X-ACTION-ADDR: "POST user/login"}
isEnvFetcher: true
mappingData:
code: "LJma"
password: "yyaaf1314"
remember: true
username: "libaozhong"
__proto__: Object
method: "POST"
mock: true
onError: ()=>{Object(o.b)(i.c.updateAuthLoginCode,"")}
onSuccess: e=> {}
rawData: {}
signal: null
url: "http://sass.yffrom.com/rtapi/user/login"
__proto__: Object
}

rawData 和 body都没数据

页面切换时保留页面内容

当需要多个页面来回切换查阅内容时,页面要保留内容、状态,相当于:
1.切换时只是隐藏组件。
2.关闭时销毁组件。

Ovine Roadmap

Ovine Roadmap

我们将实时同步 Ovine 开发进度~
Ovine 感谢兴趣的小伙伴,欢迎在此留言讨论 ~

能否添加自定义loader, plugin

未在文档中看到开放出来的修改打包配置的方法, 如果想要添加coffeescript loader, 或者自定义的postCSS插件, 可以实现吗?

store is not resolve

util文件里的storage.js里面引入store,我没找到在哪里导出的store啊,麻烦了

主题逻辑损坏

如图,0.16之后默认主题的name和text被修改了,导致旧有项目的主题出问题

image

表现为:

  1. 清除所有缓存数据,重新登录,发现页眉元素错位,错位元素的class形如undefinedLayout-brandBar navbar-dark
  2. 手工指定一遍主题后,恢复正常
  3. 尝试修改旧有项目代码如下:
import { AppTheme } from '@core/app/theme'

import cxdTheme from './themes/cxd'
import darkTheme from './themes/dark'
import defaultTheme from './themes/def'

export const theme = new AppTheme({
  default: defaultTheme, //替换为  default: cxdTheme 则问题消失,但会出现2个淡雅主题选项,如下图。(替换为其它都不解决问题)
  cxd: cxdTheme,
  dark: darkTheme,
})

image

包packages/cli下yarn tsc WebpackDevServer错误类型“Compiler”的参数不能赋给类型“Compiler | MultiCompiler”的参数。

src/commands/dev.ts:106:42 - error TS2345: Argument of type 'Compiler' is not assignable to parameter of type 'Compiler | MultiCompiler'.
Type 'import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").Compiler' is not assignable to type 'import("/home/hange/work/ovine/node_modules/@types/webpack/index").Compiler'.
The types of 'hooks.shouldEmit.taps' are incompatible between these types.
Type 'import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, any, any, any>[]' is not assignable to type 'import("/home/hange/work/ovine/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, any, any, any>[]'.
Type 'import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, any, any, any>' is not assignable to type 'import("/home/hange/work/ovine/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, any, any, any>'.
Types of property 'fn' are incompatible.
Type '((arg1: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, arg2: any, arg3: any, ...args: any[]) => void) | ((arg1: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, arg2: any, arg3: any, ...args: any[]) => a...' is not assignable to type '((arg1: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, arg2: any, arg3: any, ...args: any[]) => void) | ((arg1: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, arg2: any, arg3: any, ...args: any[]) => any) | ((arg1: import("/hom...'.
Type '(arg1: Compilation, arg2: any, arg3: any, ...args: any[]) => void' is not assignable to type '((arg1: Compilation, arg2: any, arg3: any, ...args: any[]) => void) | ((arg1: Compilation, arg2: any, arg3: any, ...args: any[]) => any) | ((arg1: Compilation, arg2: any, arg3: any, ...args: any[]) => Promise<...>)'.
Type '(arg1: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, arg2: any, arg3: any, ...args: any[]) => void' is not assignable to type '(arg1: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, arg2: any, arg3: any, ...args: any[]) => void'.
Types of parameters 'arg1' and 'arg1' are incompatible.
Type 'import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation' is not assignable to type 'import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation'.
The types of 'hooks.record.taps' are incompatible between these types.
Type 'import("/home/hange/work/ovine/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, import("/home/hange/work/ovine/node_modules/@types/webpack/index"...' is not assignable to type 'import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, import("/home/hange/work/ovine/packages...'.
Type 'import("/home/hange/work/ovine/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, import("/home/hange/work/ovine/node_modules/@types/webpack/index"...' is not assignable to type 'import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, import("/home/hange/work/ovine/packages...'.
Types of property 'fn' are incompatible.
Type '((arg1: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, arg2: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Record[], arg3: any, ...args: any[]) => void) | ((arg1: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilati...' is not assignable to type '((arg1: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, arg2: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Record[], arg3: any, ...args: any[]) => void) | ((arg1: import("/home/hange/work/ovine/packages/cli/node_m...'.
Type '(arg1: Compilation, arg2: Record[], arg3: any, ...args: any[]) => void' is not assignable to type '((arg1: Compilation, arg2: Record[], arg3: any, ...args: any[]) => void) | ((arg1: Compilation, arg2: Record[], arg3: any, ...args: any[]) => undefined) | ((arg1: Compilation, arg2: Record[], arg3: any, ...args: any[]) => Promise<...>)'.
Type '(arg1: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, arg2: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Record[], arg3: any, ...args: any[]) => void' is not assignable to type '(arg1: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, arg2: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Record[], arg3: any, ...args: any[]) => void'.
Types of parameters 'arg1' and 'arg1' are incompatible.
Type 'import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation' is not assignable to type 'import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation'.
The types of 'hooks.record.taps' are incompatible between these types.
Type 'import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, import("/home/hange/work/ovine/packages...' is not assignable to type 'import("/home/hange/work/ovine/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, import("/home/hange/work/ovine/node_modules/@types/webpack/index"...'.
Type 'import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, import("/home/hange/work/ovine/packages...' is not assignable to type 'import("/home/hange/work/ovine/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, import("/home/hange/work/ovine/node_modules/@types/webpack/index"...'.
Types of property 'fn' are incompatible.
Type '((arg1: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, arg2: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Record[], arg3: any, ...args: any[]) => void) | ((arg1: import("/home/hange/work/ovine/packages/cli/node_m...' is not assignable to type '((arg1: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, arg2: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Record[], arg3: any, ...args: any[]) => void) | ((arg1: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilati...'.
Type '(arg1: Compilation, arg2: Record[], arg3: any, ...args: any[]) => void' is not assignable to type '((arg1: Compilation, arg2: Record[], arg3: any, ...args: any[]) => void) | ((arg1: Compilation, arg2: Record[], arg3: any, ...args: any[]) => undefined) | ((arg1: Compilation, arg2: Record[], arg3: any, ...args: any[]) => Promise<...>)'.

106 const devServer = new WebpackDevServer(compiler, devServerConfig)
~~~~~~~~

Found 1 error.

类型“Compiler”的参数不能赋给类型“Compiler | MultiCompiler”的参数。
不能将类型“import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").Compiler”分配给类型“import("/home/hange/work/ovine/node_modules/@types/webpack/index").Compiler”。
在这些类型中,"hooks.shouldEmit.taps" 的类型不兼容。
不能将类型“import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, any, any, any>[]”分配给类型“import("/home/hange/work/ovine/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, any, any, any>[]”。
不能将类型“import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, any, any, any>”分配给类型“import("/home/hange/work/ovine/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, any, any, any>”。
属性“fn”的类型不兼容。
不能将类型“((arg1: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, arg2: any, arg3: any, ...args: any[]) => any) | ((arg1: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, arg2: any, arg3: any, ...args: any[]) => vo...”分配给类型“((arg1: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, arg2: any, arg3: any, ...args: any[]) => any) | ((arg1: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, arg2: any, arg3: any, ...args: any[]) => void) | ((arg1: import("/hom...”。
不能将类型“(arg1: Compilation, arg2: any, arg3: any, ...args: any[]) => any”分配给类型“((arg1: Compilation, arg2: any, arg3: any, ...args: any[]) => any) | ((arg1: Compilation, arg2: any, arg3: any, ...args: any[]) => void) | ((arg1: Compilation, arg2: any, arg3: any, ...args: any[]) => Promise<...>)”。
不能将类型“(arg1: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, arg2: any, arg3: any, ...args: any[]) => any”分配给类型“(arg1: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, arg2: any, arg3: any, ...args: any[]) => any”。
参数“arg1”和“arg1” 的类型不兼容。
不能将类型“import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation”分配给类型“import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation”。
在这些类型中,"hooks.record.taps" 的类型不兼容。
不能将类型“import("/home/hange/work/ovine/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation...”分配给类型“import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, import("/home/hange/work/ovine/packages...”。
不能将类型“import("/home/hange/work/ovine/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation...”分配给类型“import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, import("/home/hange/work/ovine/packages...”。
属性“fn”的类型不兼容。
不能将类型“((arg1: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, arg2: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Record[], arg3: any, ...args: any[]) => undefined) | ((arg1: import("/home/hange/work/ovine/node_modules/@types/webpack/index").comp...”分配给类型“((arg1: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, arg2: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Record[], arg3: any, ...args: any[]) => undefined) | ((arg1: import("/home/hange/work/ovine/packages/cli/n...”。
不能将类型“(arg1: Compilation, arg2: Record[], arg3: any, ...args: any[]) => undefined”分配给类型“((arg1: Compilation, arg2: Record[], arg3: any, ...args: any[]) => undefined) | ((arg1: Compilation, arg2: Record[], arg3: any, ...args: any[]) => void) | ((arg1: Compilation, arg2: Record[], arg3: any, ...args: any[]) => Promise<...>)”。
不能将类型“(arg1: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, arg2: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Record[], arg3: any, ...args: any[]) => undefined”分配给类型“(arg1: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, arg2: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Record[], arg3: any, ...args: any[]) => undefined”。
参数“arg1”和“arg1” 的类型不兼容。
不能将类型“import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation”分配给类型“import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation”。
在这些类型中,"hooks.record.taps" 的类型不兼容。
不能将类型“import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, import("/home/hange/work/ovine/packages...”分配给类型“import("/home/hange/work/ovine/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation...”。
不能将类型“import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/packages/cli/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, import("/home/hange/work/ovine/packages...”分配给类型“import("/home/hange/work/ovine/node_modules/@types/tapable/index").Tap<import("/home/hange/work/ovine/node_modules/@types/tapable/index").TapType, import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation...”。
属性“fn”的类型不兼容。
不能将类型“((arg1: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Compilation, arg2: import("/home/hange/work/ovine/packages/cli/node_modules/@types/webpack/index").compilation.Record[], arg3: any, ...args: any[]) => undefined) | ((arg1: import("/home/hange/work/ovine/packages/cli/n...”分配给类型“((arg1: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Compilation, arg2: import("/home/hange/work/ovine/node_modules/@types/webpack/index").compilation.Record[], arg3: any, ...args: any[]) => undefined) | ((arg1: import("/home/hange/work/ovine/node_modules/@types/webpack/index").comp...”。
不能将类型“(arg1: Compilation, arg2: Record[], arg3: any, ...args: any[]) => undefined”分配给类型“((arg1: Compilation, arg2: Record[], arg3: any, ...args: any[]) => undefined) | ((arg1: Compilation, arg2: Record[], arg3: any, ...args: any[]) => void) | ((arg1: Compilation, arg2: Record[], arg3: any, ...args: any[]) => Promise<...>)”。ts(2345)
const compiler: webpack.Compiler
没有可用的快速修复

error Command failed with exit code 2.

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.