했던것들/Vue.JS
The template root requires exactly one element.eslint-plugin-vue 오류 해결
2DC
2023. 3. 9. 14:04
생기는 이유 (추측)
vue3에서는 template 내 element가 하나여야할 이유가 없음.
하지만 한 폴더 내 vue 관련 프로젝트가 많을 경우나 기타등등 여러 요인으로 인해
vue의 lint가 vue 버전을 확실히 추적하기 어려워함.
그래서 vetur가 모든 것마다 에러를 뿜어버림.
해결
Vue 3 The template root requires exactly one element. eslint-plugin-vue
After scaffolding a Vue 3 project I noticed an error in my App.vue. A functional component that renders the matched component for the given path. Components rendered in can also contain its own , w...
stackoverflow.com
일단,
환경설정에서 vue의 validation을 끄는 방법이 있음.
- Ctrl + Shift + P 누르고 Open Settings (JSON) 들어감
- 밑에 아래 코드 추가함
"vetur.validation.template": false,
"vetur.validation.script": false,
"vetur.validation.style": false,