ERROR in ./src/main.js
Module not found: Error: Can’t resolve ‘style-loader’ in ‘/Users/lm/Desktop/03-webpack-loader’
@ ./src/main.js 13:0-27
npm ERR! code 2
npm ERR! path /Users/lm/Desktop/03-webpack-loader
npm ERR! command failed
npm ERR! command sh -c webpack
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/lm/.npm/_logs/2021-02-28T02_23_38_723Z-debug.log
lm@promote 03-webpack-loader % npm install css-loader style-loader -D
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: webpack@3.6.0
npm ERR! node_modules/webpack
npm ERR! peer webpack@"^1.9 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3.0.0" from uglifyjs-webpack-plugin@0.4.6
npm ERR! node_modules/uglifyjs-webpack-plugin
npm ERR! uglifyjs-webpack-plugin@"^0.4.6" from webpack@3.6.0
npm ERR! dev webpack@"^3.6.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev css-loader@"^2.0.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: webpack@4.46.0
npm ERR! node_modules/webpack
npm ERR! peer webpack@"^4.0.0" from css-loader@2.1.1
npm ERR! node_modules/css-loader
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/lm/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/lm/.npm/_logs/2021-02-28T02_24_44_387Z-debug.log