请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

就救啊啊,为什么npm install stylus --save npm install stylus-loader --save不行

就救啊啊,为什么npm install stylus --save npm install stylus-loader --save不行

C:\Users\Administrator\Desktop\travel>npm install stylus --save

added 7 packages, and audited 1286 packages in 15s

61 packages are looking for funding
run npm fund for details

40 vulnerabilities (25 moderate, 15 high)

To address issues that do not require attention, run:
npm audit fix

To address all issues (including breaking changes), run:
npm audit fix --force

Run npm audit for details.

C:\Users\Administrator\Desktop\travel>npm install stylus-loader --save
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: travel@1.0.0
npm ERR! Found: webpack@3.12.0
npm ERR! node_modules/webpack
npm ERR! dev webpack@"^3.6.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^5.0.0" from stylus-loader@6.2.0
npm ERR! node_modules/stylus-loader
npm ERR! stylus-loader@"*" 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\Administrator\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\Administrator\AppData\Local\npm-cache_logs\2021-12-24T09_09_54_585Z-debug.log

正在回答 回答被采纳积分+3

1回答

Dell 2021-12-26 23:06:16

把你的node_modules 文件夹删除,依赖全部重新安装一次试试

0 回复 有任何疑惑可以回复我~
  • 这个文件夹删除了,依赖重新安装仍出现这个错误,请问还有什么办法处理?
    回复 有任何疑惑可以回复我~ 2022-01-23 22:20:18
  • Dell 回复 慕勒6429283 #2
    搜索 cnpm,安装 cnpm 后使用 cnpm 安装依赖
    回复 有任何疑惑可以回复我~ 2022-02-07 22:29:13
  • Dell #3
    npm install stylus --save 
    npm install stylus-loader --save
    分两次执行
    回复 有任何疑惑可以回复我~ 2022-05-13 23:31:34
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信