Error: @vitejs/plugin-vue requires vue (>=3.2.13) or @vue/compiler-sfc to be present in the dependen

Error: @vitejs/plugin-vue requires vue (>=3.2.13) or @vue/compiler-sfc to be present in the dependen_第1张图片

解决方法: 

npm install [email protected] --save-dev

问题大概原因:查看package.json文件中节点dependencies下面vue的版本是3.2.13,说明版本没问题。执行上面命令安装后移动到了dependencies节点下面,然后执行运行命令npm run serve就正常了。

devDependencies: 开发时所依赖的工具包;

dependencies:项目正常允许时需要的依赖包;

Error: @vitejs/plugin-vue requires vue (>=3.2.13) or @vue/compiler-sfc to be present in the dependen_第2张图片

参考:https://blog.csdn.net/qq_36894763/article/details/130715210

你可能感兴趣的:(vue,vue.js,javascript,前端)