如果出现如下报错大概率是因为install时中途出现异常导致vue-template-compiler依赖没有正常安装导致的,重新安装即可

Syntax Error: TypeError: Cannot read properties of undefined (reading 'parseComponent')You may use special comments to disable some warnings.Use // eslint-disable-next-line to ignore the next line.Use /* eslint-disable */ to ignore all warnings in a file.

1、 yarn add vue-template-compiler
或 npm add vue-template-compiler
2、最后如果还是不行就再用
yarn upgrade –latest vue-template-compiler
npm upgrade –latest vue-template-compiler