sass-loader兼容性问题

PS E:\dome\automated-test-platform-vue2> npm install sass@~1.32 sass-loader@10.1.1 deepmerge -D
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: automated-test-platform-vue2@1.0.0
npm ERR! Found: webpack@3.12.0
npm ERR! node_modules/webpack
npm ERR!   webpack@"^3.6.0" from the root project
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^4.36.0 || ^5.0.0" from sass-loader@10.1.1
npm ERR! node_modules/sass-loader
npm ERR!   dev sass-loader@"10.1.1" 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 C:\Users\shenyf\AppData\Local\npm-cache\eresolve-report.txt for a full report.npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\shenyf\AppData\Local\npm-cache\_logs\2022-01-12T09_00_24_153Z-debug.logPS E:\dome\automated-test-platform-vue2> npm install sass@~1.32 sass-loader@9 deepmerge -D
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: automated-test-platform-vue2@1.0.0
npm ERR! Found: webpack@3.12.0
npm ERR! node_modules/webpack
npm ERR!   webpack@"^3.6.0" from the root project
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^4.36.0 || ^5.0.0" from sass-loader@9.0.3
npm ERR! node_modules/sass-loader
npm ERR!   dev sass-loader@"9" 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 C:\Users\shenyf\AppData\Local\npm-cache\eresolve-report.txt for a full report.npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\shenyf\AppData\Local\npm-cache\_logs\2022-01-12T09_00_47_449Z-debug.logPS E:\dome\automated-test-platform-vue2> npm install sass@~1.32 sass-loader@8 deepmerge -D
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: automated-test-platform-vue2@1.0.0
npm ERR! Found: webpack@3.12.0
npm ERR! node_modules/webpack
npm ERR!   webpack@"^3.6.0" from the root project
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^4.36.0 || ^5.0.0" from sass-loader@8.0.2
npm ERR! node_modules/sass-loader
npm ERR!   dev sass-loader@"8" 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 C:\Users\shenyf\AppData\Local\npm-cache\eresolve-report.txt for a full report.npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\shenyf\AppData\Local\npm-cache\_logs\2022-01-12T09_01_01_870Z-debug.logPS E:\dome\automated-test-platform-vue2> npm install sass@~1.32 sass-loader@7 deepmerge -Dadded 7 packages, and audited 1274 packages in 36s63 packages are looking for fundingrun `npm fund` for details86 vulnerabilities (2 low, 69 moderate, 15 high)To address issues that do not require attention, run:npm audit fixTo address all issues (including breaking changes), run:npm audit fix --forceRun `npm audit` for details.
PS E:\dome\automated-test-platform-vue2>

解决办法:上面包含解决问题的过程,主要是挨个降级安装,直到安装成功,其他兼容性问题,亦可按此方法解决

npm audit fix兼容性问题

PS E:\dome\automated-test-platform-vue2> npm audit fix
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: automated-test-platform-vue2@1.0.0
npm ERR! Found: webpack@5.66.0
npm ERR! node_modules/webpack
npm ERR!   webpack@"^5.66.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^2.0.0 || ^3.0.0" from uglifyjs-webpack-plugin@1.1.2
npm ERR! node_modules/uglifyjs-webpack-plugin
npm ERR!   dev uglifyjs-webpack-plugin@"^1.1.1" 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 C:\Users\shenyf\AppData\Local\npm-cache\eresolve-report.txt for a full report.npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\shenyf\AppData\Local\npm-cache\_logs\2022-01-12T09_13_44_800Z-debug.log
PS E:\dome\automated-test-platform-vue2>

解决办法:该降级降级,该升级升级,关键所在就是npm uninstall xxxx然后再执行npm audit fixnpm audit fix --force让程序选择自己想要的版本

PS E:\dome\automated-test-platform-vue2> npm audit fix --force
npm WARN using --force Recommended protections disabled.
[..................] \ : WARN using --force Recommended protections disabled.
npm WARN audit Updating vue-loader to 17.0.0,which is a SemVer major change.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: friendly-errors-webpack-plugin@1.7.0
npm WARN Found: webpack@5.66.0
npm WARN node_modules/webpack
npm WARN   peer webpack@"^5.0.0" from css-loader@6.5.1
npm WARN   node_modules/css-loader
npm WARN     dev css-loader@"^6.5.1" from the root project
npm WARN   7 more (postcss-loader, terser-webpack-plugin, url-loader, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from friendly-errors-webpack-plugin@1.7.0
npm WARN node_modules/friendly-errors-webpack-plugin
npm WARN   dev friendly-errors-webpack-plugin@"^1.6.1" from the root project
npm WARN
npm WARN Conflicting peer dependency: webpack@4.46.0
npm WARN node_modules/webpack
npm WARN   peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from friendly-errors-webpack-plugin@1.7.0
npm WARN   node_modules/friendly-errors-webpack-plugin
npm WARN     dev friendly-errors-webpack-plugin@"^1.6.1" from the root project
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: uglifyjs-webpack-plugin@1.3.0
npm WARN Found: webpack@5.66.0
npm WARN node_modules/webpack
npm WARN   peer webpack@"^5.0.0" from css-loader@6.5.1
npm WARN   node_modules/css-loader
npm WARN     dev css-loader@"^6.5.1" from the root project
npm WARN   7 more (postcss-loader, terser-webpack-plugin, url-loader, ...)
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from uglifyjs-webpack-plugin@1.3.0
npm WARN node_modules/uglifyjs-webpack-plugin
npm WARN   dev uglifyjs-webpack-plugin@"^1.1.1" from the root project
npm WARN
npm WARN Conflicting peer dependency: webpack@4.46.0
npm WARN node_modules/webpack
npm WARN   peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from uglifyjs-webpack-plugin@1.3.0
npm WARN   node_modules/uglifyjs-webpack-plugin
npm WARN     dev uglifyjs-webpack-plugin@"^1.1.1" from the root projectadded 9 packages, removed 11 packages, changed 1 package, and audited 730 packages in 6s68 packages are looking for fundingrun `npm fund` for details# npm audit reportansi-regex  >2.1.1 <5.0.1
Severity: moderateInefficient Regular Expression Complexity in chalk/ansi-regex - https://github.com/advisories/GHSA-93q8-gq69-wqmw
fix available via `npm audit fix`
node_modules/string-width/node_modules/ansi-regexstrip-ansi  4.0.0 - 5.2.0Depends on vulnerable versions of ansi-regexnode_modules/string-width/node_modules/strip-ansistring-width  2.1.0 - 4.1.0Depends on vulnerable versions of strip-ansinode_modules/string-widthserialize-javascript  <=3.0.0
Severity: high
Insecure serialization leading to RCE in serialize-javascript - https://github.com/advisories/GHSA-hxcc-f52p-wc94
Cross-Site Scripting in serialize-javascript - https://github.com/advisories/GHSA-h9rv-jmmf-4pgx
fix available via `npm audit fix`
node_modules/serialize-javascriptcopy-webpack-plugin  4.3.0 - 5.0.4Depends on vulnerable versions of cacacheDepends on vulnerable versions of serialize-javascriptnode_modules/copy-webpack-pluginuglifyjs-webpack-plugin  >=1.1.3Depends on vulnerable versions of cacacheDepends on vulnerable versions of serialize-javascriptnode_modules/uglifyjs-webpack-pluginssri  5.2.2 - 6.0.1
Severity: high
Regular Expression Denial of Service (ReDoS) - https://github.com/advisories/GHSA-vx3p-948g-6vhq
fix available via `npm audit fix`
node_modules/ssricacache  10.0.4 - 11.0.0Depends on vulnerable versions of ssrinode_modules/cacachecopy-webpack-plugin  4.3.0 - 5.0.4Depends on vulnerable versions of cacacheDepends on vulnerable versions of serialize-javascriptnode_modules/copy-webpack-pluginuglifyjs-webpack-plugin  >=1.1.3Depends on vulnerable versions of cacacheDepends on vulnerable versions of serialize-javascriptnode_modules/uglifyjs-webpack-plugin8 vulnerabilities (3 moderate, 5 high)To address all issues, run:npm audit fixPS E:\dome\automated-test-platform-vue2> npm audit fix
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: automated-test-platform-vue2@1.0.0
npm ERR! node_modules/webpack
npm ERR!   webpack@"^5.66.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^2.0.0 || ^3.0.0" from uglifyjs-webpack-plugin@1.1.2
npm ERR! node_modules/uglifyjs-webpack-plugin
npm ERR!   dev uglifyjs-webpack-plugin@"^1.1.1" 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! A complete log of this run can be found in:
npm ERR!     C:\Users\shenyf\AppData\Local\npm-cache\_logs\2022-01-12T09_13_44_800Z-debug.log
PS E:\dome\automated-test-platform-vue2> npm uninstall uglifyjs-webpack-pluginremoved 13 packages, and audited 717 packages in 7s68 packages are looking for fundingrun `npm fund` for details7 vulnerabilities (3 moderate, 4 high)To address all issues, run:npm audit fixRun `npm audit` for details.PS E:\dome\automated-test-platform-vue2> npm audit fix
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: friendly-errors-webpack-plugin@1.7.0
npm ERR! Found: webpack@5.66.0
npm ERR! node_modules/webpack
npm ERR!   webpack@"^5.66.0" from the root project
npm ERR!   peer webpack@"^5.0.0" from css-loader@6.5.1
npm ERR!   node_modules/css-loader
npm ERR!     dev css-loader@"^6.5.1" from the root project
npm ERR!   6 more (postcss-loader, terser-webpack-plugin, url-loader, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from friendly-errors-webpack-plugin@1.7.0
npm ERR!   dev friendly-errors-webpack-plugin@"^1.6.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: webpack@4.46.0
npm ERR! node_modules/webpack
npm ERR!   peer webpack@"^2.0.0 || ^3.0.0 || ^4.0.0" from friendly-errors-webpack-plugin@1.7.0
npm ERR!   node_modules/friendly-errors-webpack-plugin
npm ERR!     dev friendly-errors-webpack-plugin@"^1.6.1" 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! A complete log of this run can be found in:
npm ERR!     C:\Users\shenyf\AppData\Local\npm-cache\_logs\2022-01-12T09_15_39_676Z-debug.logPS E:\dome\automated-test-platform-vue2> npm uninstall friendly-errors-webpack-pluginremoved 10 packages, changed 1 package, and audited 707 packages in 6s68 packages are looking for fundingrun `npm fund` for details4 high severity vulnerabilitiesTo address all issues, run:npm audit fixRun `npm audit` for details.PS E:\dome\automated-test-platform-vue2> npm audit fixup to date, audited 707 packages in 5s68 packages are looking for fundingrun `npm fund` for details# npm audit reportserialize-javascript  <=3.0.0
Severity: high
Insecure serialization leading to RCE in serialize-javascript - https://github.com/advisories/GHSA-hxcc-f52p-wc94
Cross-Site Scripting in serialize-javascript - https://github.com/advisories/GHSA-h9rv-jmmf-4pgx
fix available via `npm audit fix`
node_modules/serialize-javascriptcopy-webpack-plugin  4.3.0 - 5.0.4       # 下一步要修复这里Depends on vulnerable versions of cacacheDepends on vulnerable versions of serialize-javascriptnode_modules/copy-webpack-pluginssri  5.2.2 - 6.0.1
Severity: high
Regular Expression Denial of Service (ReDoS) - https://github.com/advisories/GHSA-vx3p-948g-6vhq
fix available via `npm audit fix`
node_modules/ssricacache  10.0.4 - 11.0.0Depends on vulnerable versions of ssrinode_modules/cacachecopy-webpack-plugin  4.3.0 - 5.0.4Depends on vulnerable versions of cacacheDepends on vulnerable versions of serialize-javascriptnode_modules/copy-webpack-plugin4 high severity vulnerabilitiesTo address all issues, run:npm audit fixPS E:\dome\automated-test-platform-vue2> npm install copy-webpack-plugin@4added 40 packages, and audited 707 packages in 14s68 packages are looking for fundingrun `npm fund` for details4 high severity vulnerabilitiesTo address all issues (including breaking changes), run:npm audit fix --forceRun `npm audit` for details.PS E:\dome\automated-test-platform-vue2> npm audit fix --force
npm WARN using --force Recommended protections disabled.
npm WARN audit Updating copy-webpack-plugin to 10.2.0,which is a SemVer major change.added 7 packages, removed 38 packages, changed 7 packages, and audited 676 packages in 18s72 packages are looking for fundingrun `npm fund` for detailsfound 0 vulnerabilitiesPS E:\dome\automated-test-platform-vue2>

修复完成

webpack、sass-loader、npm audit fix、npm audit fix --force兼容性问题相关推荐

  1. webpack自定义loader并发布到npm

    一.官网对loader的解释: 1.loader 是导出为一个函数的 node 模块.该函数在 loader 转换资源的时候调用.给定的函数将调用 loader API,并通过 this 上下文访问. ...

  2. Bootstrap4默认样式不对胃口?教你使用NPM+Webpack+SASS来定制

    Bootstrap 是一个流行的前端样式库,可以方便快速的构建应用,但默认样式可能不尽人意,本文就介绍如何使用 NPM, Webpack, SASS 针对它的源码来定制自己的主题.版本使用的是 Boo ...

  3. webpack之 loader

    开篇 loader不难,loader不难,loader不难.默念三遍,然后开始. loader 简介 loader 这个东西配置 webpack 的时候经常用到,刚开始会让人觉得有一种神秘感. 看了文 ...

  4. NPM服务器维修,npm run dev无法启动服务器

    我正在尝试执行" npm run dev",但它没有启动服务器.我以为应该打开http://127.0.0.1:8000.我如何做到这一点? " npm start&qu ...

  5. gulp + webpack + sass 学习

    笔记: 1. new webpack.optimize.CommonsChunkPlugin 核心作用是抽离公共代码,chunks:['index.js','main.js'] 另一个作用就是单独生成 ...

  6. 关于在VUE中使用sass loader报错的问题

    关于在VUE中使用sass loader报错的问题 一般是关于依赖问题 因为npm的跨境问题导致很多包下载断点,故使用淘宝镜像方可解决问题.能处理百分之七十的问题 关于webpack问题 可能由于we ...

  7. vue-cli Webpack之Loader原理及自定义Loader

    文章目录 1. Loader 分类与执行顺序 1.1 Loader 分类 1.2 Loader 执行顺序 1.3 使用Loader方式 1.3.1 内联 Loader 2. 开发 Loader 步骤 ...

  8. webpack css loader

    我们新建一个login.js文件,作为一个组件. 这里定义了一个函数,函数中创建了h2标签,然后给标签中添加文字.还有类名className,最后把这个dom返回.最后通过document.body. ...

  9. npm : 无法将“npm”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。 所在位置 行:1 字符: 1

    vs终端输入npm install出现错误 我首先做的两件事 直接cmd,输入 npm config set registry http://registry.npm.taobao.org/ 然后,项 ...

最新文章

  1. php rule engine,jinchunguang
  2. liferay7.0 mysql_Liferay7 BPM门户开发之6: Activiti数据库换为mysql
  3. python代码大全表解释-python中的字典用法大全的代码
  4. java通过jxl处理execl空行_jxl操作Excel导入数据库之空行的处理
  5. 【Qt】QModbusPdu类
  6. Fastboot Normal + Recovery
  7. 【转】C#开发奇技淫巧二:根据dll文件加载C++或者Delphi插件
  8. 嵌入式串口打印信息重定向到当前终端界面
  9. VMware Workstation 12.5 安装Mac OS X
  10. Java实现MongoDB的日期(Date)分组功能
  11. Learn OpenGL(一)图形渲染管线(Pipeline)
  12. WP7 手机软件纪念 - 稍后读软件
  13. 第九届信号与图像处理国际学术研讨会(CSIP 2022)
  14. SDKMAN!使用指南
  15. 百度网盘直链下载助手(MacOSChrome)
  16. AcWing算法基础课 第一讲小结(持续更新中)
  17. Arduino 实现红绿灯效果
  18. sed命令在Mac OS X上出现“未定义标签”错误
  19. Android 获取通讯录数据
  20. 从dtx文件得到cls文件

热门文章

  1. 如何统一设置或者修改Excel表格中图表样式
  2. VUE3(二十四)自定义alert弹窗组件
  3. 笔记本分屏后鼠标卡顿问题解决
  4. ESP32接入米家-小爱同学-IDF环境-巴法平台
  5. 股市币市:本周交易数据分析与最新公告
  6. linux 无法实例化类,linux – 有没有办法将两个实例化的systemd服务作为一个单元进行控制?...
  7. Kaggle手机验证manually verified
  8. 高分子DBCO-PEG-acid需要存储在-20°C,避光,避湿的环境,DBCO-PEG-COOH,末端羧酸在活化剂(如EDC或HATU)存在下可与伯胺基反应,形成稳定的酰胺键。
  9. AntDesign 分页 警告 [`dataSource` length is less than `pagination.total` but......] 解决方法
  10. cpuz测试分数天梯图_处理器CPU性能天梯图表CinebenchR15Ranking2016