使用vue3成功创建项目后无法正常npm run serve
Error: Cannot find module 'vue-loader-v16/package.json'
我采用 了如下方法:
npm i -D vue- loader@14
但是再次执行npm run serve时又出现了新的错误如下
Error: vue-loader requires @vue/compiler-sfc to be present in the dependency tree.
我采用了如下方法:
rm node_modules -r -fo
rm package-lock.json
npm cache clear --force
npm install
Error: vue-loader requires @vue/compiler-sfc to be present in the dependency tree.
最后,经过我加班熬夜的冥思苦想后终于找到了解决的办法
https://blog.csdn.net/qq_53810245/article/details/123247521
是否是node版本过低呢