728x90
728x90
[ 문제 상황 ]
vue-konva는 기본적으로 컴포넌트명에 'v-' 접두사를 붙여서 케밥 케이스로 사용한다.
ex) v-stage, v-text, ...
이전에 다른 프로젝트에서는 괜찮았는데, 이번 프로젝트는 저장 시 컴포넌트명이 자동으로 파스칼 케이스로 변환되도록 규칙이 설정되어 있어서 컴포넌트 인식이 안되는 문제가 발생했다.
<VStage :config="containerConfig">
<VLayer>
<VText :config="{ text: 'temp', fontSize: 15 }" />
</VLayer>
</VStage>
[Vue warn]: Failed to resolve component: VStage If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. at <PaybackChallenge onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< null > > at <RouterView > at <AppLayout onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< Proxy(Object) {__v_skip: true} > > at <RouterView > at <App>
[ 해결 ]
main.ts에 VueKonva를 등록할 때 prefix를 변경해주면 된다.
import VueKonva from 'vue-konva'
// 생략
app.use(VueKonva, { prefix: 'V' })
app.mount('#app')
320x100
반응형
'Error Notes' 카테고리의 다른 글
| [Vue.js/PrimeVue] Password 컴포넌트에 구글 계정 정보가 자동 입력되는 문제 (1) | 2025.07.09 |
|---|---|
| [Swagger] Please indicate a valid Swagger or OpenAPI version field. (0) | 2025.06.11 |
| [JavaScript] 사파리에서 파일을 업로드했을 때 파일명 자소분리 현상이 발생하는 문제 (0) | 2024.10.23 |
| [PHP/Wordpress] YOAST SEO - Error parsing the response to JSON (5) | 2024.08.22 |
| [PHP/Wordpress] 워드프레스 관리자 계정 정보가 다른 input 박스에 자동으로 입력되는 문제 (4) | 2024.06.13 |
