VUE : npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve 错误有效解决
-
- [npm install 安装组件的时候出现以上问题,npm版本问题报错](#npm install 安装组件的时候出现以上问题,npm版本问题报错)
- 解决方法:
- 用上述方法安装完成之后又出现其他的问题
npm install 安装组件的时候出现以上问题,npm版本问题报错

解决方法:
powershell
npm install --legacy-peer-deps

用上述方法安装完成之后又出现其他的问题
powershell
Deprecation Warning [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.
Deprecation Warning [import]: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

解决方法:修改sass 版本
powershell
# vue2
"sass": "~1.32.6",
"sass-loader": "^10.5.2",
# vue3+vite+ts
"sass": "^1.81.0",
"sass-loader": "^16.0.3",