[英]could not install sass-loader using npm
当我使用此命令在我的项目中安装 sass-loader 时:
npm install sass-loader@12.4.0
显示这样的错误:
➜ crx-selection-translate git:(6.x-master) ✗ npm install sass-loader@12.4.0
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: webpack@1.15.0
npm ERR! node_modules/webpack
npm ERR! dev webpack@"^1.13.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^5.0.0" from sass-loader@12.4.0
npm ERR! node_modules/sass-loader
npm ERR! sass-loader@"12.4.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/xiaoqiangjiang/.npm/eresolve-report.txt for a full report.
为什么会这样? 我应该怎么做才能解决这个问题? 是否可以自动解决和修复依赖关系? 我真的不知道我应该使用哪个版本,我仍然不知道依赖关系矩阵,是否可以让 npm 找到最合适的依赖关系并自动安装和修复?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.