原因一:没有安装 vue-template-compiler npm i -D vue-template-compiler 原因二:vue版本跟vue-template-compiler版本不一致 将版本同步一致就可以了