EY-Solution / EY-Solution.github.io

0 stars 0 forks source link

@progress/kendo-vue-charts dependancy 추가 후 generate 문제 #4

Closed dreamcometrue-color closed 1 month ago

dreamcometrue-color commented 1 month ago

안녕하세요

vectorx-templates-nuxt-kendo-ui-bo 에서 yarn generate 하는 과정에 오류가 있어 문의 드립니다.

Kendo UI for Vue 3.x를 사용하기 위하여 package.json의 resolutions에 기존에 있던 내용은 그대로 두고 가이드 문서(https://vectorx.notion.site/Kendo-UI-c7cf9534a60b46ed9d45af2f19f16160#8e059ba9850144459ebf897bb02a0935) 내용에 따라 "@progress/kendo-vue-grid": "3.14.2", 와 같이 @progress/kendo-vue-로 시작하는 16항목 모두 resolutions에 추가하였습니다. 또 차트가 필요하여 "yarn add @progress/kendo-vue-charts@3.14.2"로 차트 관련 패키지를 설치하였습니다.

yarn run dev 명령으로 로컬에서는 라이센스 적용되고 실행이 잘 되었으나 배포하기 위하여 yarn generate 하면 에러가 납니다. 다음은 에러 메시지 중 일부입니다.

$ vue-tsc --noEmit && nuxi typecheck docs node_modules/@vectorx/nuxt-kendo-ui/src/composables/treelist.ts:45:3 - error TS2344: Type '"onRowclick" | "onDatastatechange" | "onExpandChange" | "onSortChange" | "onFilterChange" | "onKeyDown" | "onRowcontextmenu" | "onRowfocus" | "onRowblur" | "onPageChange"' does not satisfy the constraint 'keyof TreeListProps'. Type '"onDatastatechange"' is not assignable to type 'keyof TreeListProps'. Did you mean '"onDataStateChange"'?

에러가 있다고 나오는 node_modules 내의 node_modules/@vectorx/nuxt-kendo-ui/src/composables/treelist.ts 파일을 수정하였습니다.

42라인 export type KendUiTreeListOptionEvent = {} & Pick< 바로 아래에 다음과 같이 수정하였습니다. 'onDataStateChange' -> 'onDatastatechange' 'onExpandchange' -> 'onExpandChange' 'onFilterchange' -> 'onFilterChange' 'onPagechange' -> 'onPageChange' 'onSortchange' -> 'onSortChange'

이렇게 하니 빌드도 되고 배포도 되고 그리드와 차트 모두 화면에 잘 나옵니다.

node_modules에 있는 파일을 수정한 것이라 그리 좋은 방법은 아닌 것 같습니다. 어떻게 해결하면 좋을지 조언 부탁드립니다.

고맙습니다.

EY-Solution commented 1 month ago

kendo ui 3버전을 적용하면서 발생되는 type 관련 오류입니다. 24.1.6-alpha.5 버전에서 패치되었으며, https://github.com/EY-Solution/vectorx-templates-nuxt-kendo-ui-bo/tree/main/.vectorx 에서 다운로드 가능합니다.

프로젝트 상황에 따라 3rd party 라이브러리 적용 시, 발생할 수 있는 상황이므로 오류 발생 시 이슈에 올려주시면 필요 시 프레임워크 업데이트 후 적용 받으시면 됩니다. 프레임워크 업데이트 전 프로젝트 내부에 우선 적용하고 싶으신 경우는 다음의 가이드를 참조하여 replace 처리 후 이슈를 공유해주세요.

https://vectorx.notion.site/Node-Module-Replace-35422d9e240c45aca9d0196f70df16cb