In a word:
vue2 uses vetur
, and vue3 uses volar
Error indication:
vue2 items in the template must be wrapped by using a root element;
Solution:
in vue3 project, Vue related plug-ins use Volar
In the vue2 project, use the plug-in Vetur
-
- disable Vetur in the current workspace. To prevent affecting the use of other projects
-
-
- E
- nable Volar
-
No more errors
Read More:
- Vue Error compiling template: Component template should contain exactly one root element. If you
- Eslint error “no undef” and eslint rule configuration in Vue cli3
- Template argument deduction/substitution failed: couldn‘t deduce template parameter [How to Solve]
- [Solved] Vue Error: Failed to mount component: template or render function not defined
- [Solved] thymeleaf.TemplateEngineException processing template “main“: An error happened during template pars
- Vue Import Baidu map error: BMap is not defined, eslint BMap reports an error
- IDEA appears Module ** must not contain source root **. The root already belongs to module ** This kind of error solution
- How to Solve Error: Element ‘dependency’ cannot have character [children], because the type’s content type is element-
- Turn off eslint checksum and resolve formatting conflicts
- [Solved] error“:“element click intercepted“,“message“:“element click intercepted“
- Vscode configures eslint to solve terminal syntax error
- [Solved] element-plus Error: Failed to resolve component
- Template Render Error Solution (Hexo blog theme, GIT upload)
- [How to Solve Vue warn]: Unknown custom element: did you register the component correctly?
- Eslint Error:“Identifier xxx is not in camel case“
- [Solved] ./configure: error: the HTTP rewrite module requires the PCRE library
- [Solved] error [email protected]: The engine “node” is incompatible with this module.
- error: switch `b‘ requires a value [How to Solve]