npm ERR! dev webpack@“^3.6.0“ from the root project npm ERR! npm ERR! Could not resolve dependency

文章目录

  • VUE项目开发node、node-sass、sass-loader版本记录
    • 1.问题:
    • 2.解决思路:
    • 3.解决截图“

VUE项目开发node、node-sass、sass-loader版本记录

1.问题:

npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
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 [email protected]
npm ERR! node_modules/sass-loader
npm ERR!   dev sass-loader@"^12.1.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!
npm ERR! For a full report see:
npm ERR! D:\nodejs\node_cache\_logs\2023-03-12T06_11_01_732Z-eresolve-report.txt

2.解决思路:

node的版本和node-sass、sass-loader版本不兼容,可以去官网查看对应的版本,我的node版本为:v16.14.0
我的配置为:
“node-sass”: “^6.0.1”,
“sass-loader”: “^7.0.3”,
只要将版本对应起来,基本问题就解决了.

3.解决截图“

npm ERR! dev webpack@“^3.6.0“ from the root project npm ERR! npm ERR! Could not resolve dependency_第1张图片
希望对你有用!!!

你可能感兴趣的:(webpack,npm,javascript)