VueCompilerError:元素缺少结束标记

ahm*_*ouk 5 html frontend vue.js vuejs2 vuejs3

我最近开始使用 vuejs,但我似乎没有发现这个错误。

在此输入图像描述

即使 html 完全存在并且没有丢失标签,它也会显示错误。

我已经尝试过,删除注释,清理 vue 项目的文件结构。

任何帮助表示感谢,谢谢

HTML 代码,test.vue文件:

<template>

        <div id="wrapper">
            <ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">
                Sidebar - Brand
                <a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.html">
                    <div class="sidebar-brand-icon rotate-n-15">
                        <i class="fas fa-laugh-wink"></i>
                    </div>
                    <div class="sidebar-brand-text mx-3">John Doe</div>
                </a> </ul> </div> </template>
Run Code Online (Sandbox Code Playgroud)

小智 0

你的vue代码没问题。重新编译您的项目。我偶尔也会遇到这个问题。重新编译总是能解决问题。

Ctrl + C

npm 运行服务