[Question] [Module Name] When dolphinscheduler-ui runs the pnpm run build:prod command, an assignment type error occurs.
Search before asking
- [X] I had searched in the issues and found no similar issues.
What happened
dolphinscheduler-3.2.2-release
dolphinscheduler-ui model,run pnpm run build:prod,Reported some errors:
src/views/projects/workflow/definition/timing/index.tsx:122:11 - error TS2322: Type 'boolean | Ref<boolean, boolean>' is not assignable to type 'boolean | undefined'. ... src/views/projects/workflow/definition/timing/index.tsx:123:11 - error TS2322: Type 'string | Ref<string, string>' is not assignable to type 'string | undefined'. ... src/views/projects/workflow/timing/index.tsx:117:11 - error TS2322: Type 'boolean | Ref<boolean, boolean>' is not assignable to type 'boolean | undefined'. ... src/views/projects/workflow/timing/index.tsx:118:11 - error TS2322: Type 'string | Ref<string, string>' is not assignable to type 'string | undefined'. ...
Found 8 errors in 4 files.
Errors Files 2 src/views/projects/task/definition/batch-task.tsx:220 2 src/views/projects/workflow/definition/index.tsx:326 2 src/views/projects/workflow/definition/timing/index.tsx:122 2 src/views/projects/workflow/timing/index.tsx:117
What you expected to happen
ts type error
How to reproduce
1、download dolphinscheduler-3.2.2-release
2、install node18 and pnpm
3、 in dolphinscheduler-ui model,run pnpm run build:prod
Anything else
No response
Version
3.2.x
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
I have the same problem!
dolphinscheduer version is v3.2.2
pnpm:6.35.1
node:v16.20.2
> vue-tsc --noEmit && vite build --mode production
src/views/datasource/list/use-form.ts:303:7 - error TS2322: Type 'string | object' is not assignable to type 'string'.
Type 'object' is not assignable to type 'string'.
303 other: values.other ? JSON.stringify(values.other) : values.other
~~~~~
src/views/datasource/list/types.ts:26:3
26 other?: string
~~~~~
The expected type comes from property 'other' which is declared here on type '{ other?: string; id?: number; name?: string; type?: IDataBase; label?: IDataBaseLabel; userName?: string; mode?: string; password?: string; database?: string; note?: string; host?: string; ... 13 more ...; datawarehouse?: string; }'
src/views/projects/task/components/node/fields/use-dependent.ts:350:50 - error TS2339: Property 'dependItemList' does not exist on type '{}'.
350 const itemListOptions = options?.dependItemList || []
~~~~~~~~~~~~~~
src/views/projects/task/components/node/fields/use-dependent.ts:356:25 - error TS2339: Property 'dependItemList' does not exist on type '{}'.
356 options.dependItemList = itemListOptions
~~~~~~~~~~~~~~
src/views/projects/task/components/node/fields/use-dependent.ts:357:17 - error TS2741: Property 'dependItemList' is missing in type '{}' but required in type '{ dependItemList: { dependentTypeOptions?: { label: string; value: string | number; }[]; definitionCodeOptions?: { label: string; value: string | number; }[]; depTaskCodeOptions?: { label: string; value: string | number; }[]; dateOptions?: { ...; }[]; }[]; }'.
357 selectOptions.value[i] = options
~~~~~~~~~~~~~~~~~~~~~~
src/views/projects/task/components/node/types.ts:93:3
93 dependItemList: IDependentItemOptions[]
~~~~~~~~~~~~~~
'dependItemList' is declared here.
src/views/projects/task/components/node/tasks/use-dependent.ts:33:26 - error TS2352: Conversion of type '{ name: string; taskPriority?: string; isCache?: "YES" | "NO"; timeoutFlag: false | "OPEN" | "CLOSE"; timeoutNotifyStrategy: string | undefined[]; taskParams?: ITaskParams; ... 279 more ...; timeoutShowFlag: boolean; }' to type 'INodeData' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'isCache' are incompatible.
Type 'string' is not comparable to type 'boolean'.
33 const model = reactive({
~
34 taskType: 'DEPENDENT',
~~~~~~~~~~~~~~~~~~~~~~~~~~
...
53 ...data
~~~~~~~~~~~
54 } as INodeData)
~~~~~~~~~~~~~~~~
src/views/projects/task/components/node/tasks/use-dependent.ts:33:26 - error TS2352: Conversion of type '{ name: string; taskPriority?: string; isCache?: "YES" | "NO"; timeoutFlag: false | "OPEN" | "CLOSE"; timeoutNotifyStrategy: string | undefined[]; taskParams?: ITaskParams; ... 279 more ...; timeoutShowFlag: boolean; }' to type 'INodeData' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
Types of property 'isCache' are incompatible.
Type 'string' is not comparable to type 'boolean'.
Type 'string' is not comparable to type 'boolean'.
33 const model = reactive({
~
34 taskType: 'DEPENDENT',
~~~~~~~~~~~~~~~~~~~~~~~~~~
...
53 ...data
~~~~~~~~~~~
54 } as INodeData)
~~~~~~~~~~~~~~~~
src/views/projects/workflow/definition/tree/index.tsx:74:11 - error TS2322: Type 'Ref<({ taskType: string; color: string; image: string; } | { taskType: string; color: string; image?: unknown; })[], ({ taskType: string; color: string; image: string; } | { taskType: string; color: string; image?: undefined; })[] | ({ ...; } | { ...; })[]>' is not assignable to type 'Ref<ITaskTypeNodeOption[], ITaskTypeNodeOption[]>'.
Type '({ taskType: string; color: string; image: string; } | { taskType: string; color: string; image?: unknown; })[]' is not assignable to type 'ITaskTypeNodeOption[]'.
Type '{ taskType: string; color: string; image: string; } | { taskType: string; color: string; image?: unknown; }' is not assignable to type 'ITaskTypeNodeOption'.
Type '{ taskType: string; color: string; image?: unknown; }' is not assignable to type 'ITaskTypeNodeOption'.
Types of property 'image' are incompatible.
Type 'unknown' is not assignable to type 'string'.
74 const taskTypeNodeOptions: Ref<Array<ITaskTypeNodeOption>> = ref([
~~~~~~~~~~~~~~~~~~~
src/views/resource/task-group/option/use-table.ts:53:5 - error TS2322: Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableBaseColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'CommonColumnInfo<any>'.
Types of property 'ellipsis' are incompatible.
Type '{ tooltip: boolean; }' is not assignable to type 'Ellipsis'.
Type '{ tooltip: boolean; }' is not assignable to type 'EllipsisProps & { style?: CSSProperties; }'.
Type '{ tooltip: boolean; }' is not assignable to type 'EllipsisProps'.
Types of property 'tooltip' are incompatible.
Type 'boolean' is not assignable to type 'true'.
53 {
~
54 title: t('resource.task_group_option.name'),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
56 ...COLUMN_WIDTH_CONFIG['name']
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 },
~~~~~
src/views/resource/task-group/option/use-table.ts:58:5 - error TS2322: Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableBaseColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'CommonColumnInfo<any>'.
Types of property 'ellipsis' are incompatible.
Type '{ tooltip: boolean; }' is not assignable to type 'Ellipsis'.
58 {
~
59 title: t('resource.task_group_option.project_name'),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
61 ...COLUMN_WIDTH_CONFIG['name']
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62 },
~~~~~
src/views/resource/task-group/option/use-table.ts:73:5 - error TS2322: Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableBaseColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'CommonColumnInfo<any>'.
Types of property 'ellipsis' are incompatible.
Type '{ tooltip: boolean; }' is not assignable to type 'Ellipsis'.
Type '{ tooltip: boolean; }' is not assignable to type 'EllipsisProps & { style?: CSSProperties; }'.
Type '{ tooltip: boolean; }' is not assignable to type 'EllipsisProps'.
Types of property 'tooltip' are incompatible.
Type 'boolean' is not assignable to type 'true'.
73 {
~
74 title: t('resource.task_group_option.desc'),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
76 ...COLUMN_WIDTH_CONFIG['note']
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77 },
~~~~~
src/views/resource/task-group/queue/use-table.ts:48:5 - error TS2322: Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableBaseColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'CommonColumnInfo<any>'.
Types of property 'ellipsis' are incompatible.
Type '{ tooltip: boolean; }' is not assignable to type 'Ellipsis'.
48 {
~
49 title: t('resource.task_group_queue.project_name'),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
51 ...COLUMN_WIDTH_CONFIG['name']
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
52 },
~~~~~
src/views/resource/task-group/queue/use-table.ts:53:5 - error TS2322: Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableBaseColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'CommonColumnInfo<any>'.
Types of property 'ellipsis' are incompatible.
Type '{ tooltip: boolean; }' is not assignable to type 'Ellipsis'.
53 {
~
54 title: t('resource.task_group_queue.task_name'),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
56 ...COLUMN_WIDTH_CONFIG['name']
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57 },
~~~~~
src/views/resource/task-group/queue/use-table.ts:58:5 - error TS2322: Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableBaseColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'CommonColumnInfo<any>'.
Types of property 'ellipsis' are incompatible.
Type '{ tooltip: boolean; }' is not assignable to type 'Ellipsis'.
58 {
~
59 title: t('resource.task_group_queue.workflow_instance_name'),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
61 ...COLUMN_WIDTH_CONFIG['name']
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62 },
~~~~~
src/views/resource/task-group/queue/use-table.ts:63:5 - error TS2322: Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'TableBaseColumn<any>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; }' is not assignable to type 'CommonColumnInfo<any>'.
Types of property 'ellipsis' are incompatible.
Type '{ tooltip: boolean; }' is not assignable to type 'Ellipsis'.
63 {
~
64 title: t('resource.task_group_queue.task_group_name'),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
66 ...COLUMN_WIDTH_CONFIG['name']
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67 },
~~~~~
src/views/security/user-manage/use-columns.ts:263:7 - error TS2322: Type '({ width: number; title: string; key: string; render: (rowData: InternalRowData, rowIndex: number) => number; } | { width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; className: string; } | { ...; } | { ...; } | { ...; } | { ...; })[]' is not assignable to type 'TableColumns<InternalRowData> | ({ title?: TableColumnGroupTitle; type?: never; key: ColumnKey; children: { title?: TableColumnTitle; ... 31 more ...; cellProps?: (rowData: InternalRowData, rowIndex: number) => HTMLAttributes; }[]; ... 9 more ...; cellProps?: (rowData: InternalRowData, rowIndex: number) => HTMLAttri...'.
Type '({ width: number; title: string; key: string; render: (rowData: InternalRowData, rowIndex: number) => number; } | { width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; className: string; } | { ...; } | { ...; } | { ...; } | { ...; })[]' is not assignable to type 'TableColumns<InternalRowData>'.
263 columns,
~~~~~~~
src/views/security/user-manage/use-columns.ts:52:5
52 columns: [] as TableColumns,
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The expected type comes from property 'columns' which is declared here on type '{ columns: TableColumns<InternalRowData>; tableWidth: number; } | { columns: ({ title?: TableColumnGroupTitle; type?: never; ... 11 more ...; cellProps?: (rowData: InternalRowData, rowIndex: number) => HTMLAttributes; } | { ...; } | { ...; } | { ...; })[]; tableWidth: number; }'
src/views/security/user-manage/use-columns.ts:264:39 - error TS2345: Argument of type '({ width: number; title: string; key: string; render: (rowData: InternalRowData, rowIndex: number) => number; } | { width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; className: string; } | { ...; } | { ...; } | { ...; } | { ...; })[]' is not assignable to parameter of type 'TableColumns<InternalRowData>'.
Type '{ width: number; title: string; key: string; render: (rowData: InternalRowData, rowIndex: number) => number; } | { width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; className: string; } | { ...; } | { ...; } | { ...; } | { ...; }' is not assignable to type 'TableColumn<InternalRowData>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; className: string; }' is not assignable to type 'TableColumn<InternalRowData>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; className: string; }' is not assignable to type 'TableBaseColumn<InternalRowData>'.
Type '{ width: number; ellipsis: { tooltip: boolean; }; title: string; key: string; className: string; }' is not assignable to type 'CommonColumnInfo<InternalRowData>'.
Types of property 'ellipsis' are incompatible.
Type '{ tooltip: boolean; }' is not assignable to type 'Ellipsis'.
Type '{ tooltip: boolean; }' is not assignable to type 'EllipsisProps & { style?: CSSProperties; }'.
Type '{ tooltip: boolean; }' is not assignable to type 'EllipsisProps'.
Types of property 'tooltip' are incompatible.
Type 'boolean' is not assignable to type 'true'.
264 tableWidth: calculateTableWidth(columns)
~~~~~~~
Found 16 errors in 7 files.
Errors Files
1 src/views/datasource/list/use-form.ts:303
3 src/views/projects/task/components/node/fields/use-dependent.ts:350
2 src/views/projects/task/components/node/tasks/use-dependent.ts:33
1 src/views/projects/workflow/definition/tree/index.tsx:74
3 src/views/resource/task-group/option/use-table.ts:53
4 src/views/resource/task-group/queue/use-table.ts:48
2 src/views/security/user-manage/use-columns.ts:263
ELIFECYCLE Command failed with exit code 2.
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.