Tag Archives: Vue item prompt root element package error

[Solved] Vue3 Eslint Error: The template root requires exactly one element

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

    1. disable Vetur in the current workspace. To prevent affecting the use of other projects

      1. E
      nable Volar

No more errors