Error content
Vue error: the template root requires exactly one element
See the following figure for details:
error information in vscode
error information in node
Error reason
Vue only allows one root node in the template.
Solution
Add a <div> tag to <template>, after that all the components will be added to <div> to solve the problem.
Read More:
- [vue/no-multiple-template-root] The template root requires exactly one element.
- Vue3 Error: [vue/no-multiple-template-root] The template root requires exactly one element
- [Solved] ERROR in ./node_modules/element-ui/lib/theme-chalk/fonts/element-icons.ttf
- Vue Import element-plus Error: Failed to resolve import “element-pluslibtheme-chalkindex.css“ from “src
- The solution to the problem that the custom styles of UI components such as element-ui in the vue project do not take effect
- How to Solve Vue add element Install Error
- Use of error attribute in element UI (solution of triggering only once)
- [Solved] Front end error: Unknown custom element
- Vue3.0 error: Failed to resolve component el-form-item (el element to be unable to be displayed)
- Vue3 + vite install element-plus error [How to Solve]
- [Solved] Error: Cannot find module ‘vue-template-compiler/package.json‘ Require stack:
- Golang: How to Read File All Content in one time
- error in ./node_modules/@lit/reactive-element/decorators/state.jsModule parse failed: Unexpected
- [Solved] Vue3 Import element UI error: Uncaught TypeError: Cannot read properties of underfined…
- [Solved] Element form method resetfields() error: vue.runtime.esm.js?2b0e:1888 TypeError: Cannot read properties of undefined (reading ‘indexOf’)
- [Solved] Error:The above error occurred in one of your React components & A component suspended while respondi
- [Solved] Vue element UI form verification error: cannot read property ‘validate’ of undefined
- Vue element component V-for error [How to Modify)
- Element-plus Warning: ElementPlusError: [Util] binding value must be a string or number.
- Vue wran name Error: Unkown custom element [How to Solve]