添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
果断的水龙头  ·  19Bootstrap5导航栏 | 醉瑾zj·  14 小时前    · 
重情义的杯子  ·  vue.js - ...·  2 天前    · 
失望的钢笔  ·  计算机自适应简介·  2 月前    · 
不爱学习的墨镜  ·  手机开个NFC ...·  2 月前    · 
欢快的开水瓶  ·  adop Errors ...·  5 月前    · 

I have been struggling with this problem a few minutes ago when I was trying to install node-sass and sass-loader in my Vuejs project.
I used this command :

npm i --save-dev node-sass sass-loader
Output:
Could not resolve dependency: npm ERR! dev sass-loader@"*" from the root project npm ERR!
With some sort of:
npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/webpack npm ERR! peer webpack@"^4.0.0" from @intervolga/[email protected] npm ERR! node_modules/@intervolga/optimize-cssnano-plugin npm ERR! @intervolga/optimize-cssnano-plugin@"^1.0.5" from @vue/[email protected] npm ERR! node_modules/@vue/cli-service npm ERR! peer @vue/cli-service@"^3.0.0 || ^4.0.0-0" from @vue/[email protected] npm ERR! node_modules/@vue/cli-plugin-babel npm ERR! dev @vue/cli-plugin-babel@"~4.5.0" from the root project npm ERR! 4 more (@vue/cli-plugin-eslint, @vue/cli-plugin-router, ...) npm ERR! peer webpack@"^4.0.0 || ^5.0.0" from @soda/[email protected] npm ERR! node_modules/@soda/friendly-errors-webpack-plugin npm ERR! @soda/friendly-errors-webpack-plugin@"^1.7.1" from @vue/[email protected] npm ERR! node_modules/@vue/cli-service npm ERR! peer @vue/cli-service@"^3.0.0 || ^4.0.0-0" from @vue/[email protected] npm ERR! node_modules/@vue/cli-plugin-babel npm ERR! dev @vue/cli-plugin-babel@"~4.5.0" from the root project npm ERR! 4 more (@vue/cli-plugin-eslint, @vue/cli-plugin-router, ...) npm ERR! 19 more (@vue/cli-plugin-babel, @vue/cli-plugin-eslint, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! dev sass-loader@"*" from the root project npm ERR! npm ERR! Conflicting peer dependency: [email protected] npm ERR! peer webpack@"^5.0.0" from [email protected] npm ERR! node_modules/sass-loader npm ERR! dev sass-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\user\AppData\Local\npm-cache\eresolve-report.txt for a full report. Enter fullscreen mode Exit fullscreen mode

So, I thought this was some dependency conflicts and there is actually a note about this here

This is how I solved the issue:
npm install -D sass-loader@^10 sass

Briefly, what is the difference between "var" and "let" keywords in Javascript? # variable # var # javascript # let Getting started with Vuejs # vue # programming

Built on Forem — the open source software that powers DEV and other inclusive communities.

Made with love and Ruby on Rails . DEV Community © 2016 - 2024.