我删除了已经安装的:node_modules 和 package-lock.json
输入命令npm install
控制台输出如下:
added 1320 packages from 676 contributors and audited 1320 packages in 127.268s
77 packages are looking for funding
run `npm fund` for details
found 117 vulnerabilities (113 moderate, 4 high)
run `npm audit fix` to fix them, or `npm audit` for details
输入命令npm audit fix
控制台输出如下:
77 packages are looking for funding
run `npm fund` for details
fixed 0 of 117 vulnerabilities in 1320 scanned packages
117 vulnerabilities required manual review and could not be updated
输入命令npm audit --json
,查看版本信息。
查资料得出原因实际上是在子组件中的样式里加了代码:
<style lang="less" scoped>
</style>
检查有没有下载相关依赖
但还是报错,原因是因为less-loader的版本太高
输入命令:
//卸载
npm uninstall --save less-loader
//安装
npm install -D less-loader@7.3.0
然后再刷新vue的可视化界面,重新启动,就能正常运行了。