这是更新错误,我更新了css-加载程序,并得到了新的错误。
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: app@0.1.0
npm ERR! Found: webpack@5.74.0
npm ERR! node_modules/webpack
npm ERR! dev webpack@"^5.74.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer webpack@"^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0" from html-webpack-plugin@3.2.0
npm ERR! node_modules/html-webpack-plug in
npm ERR! html-webpack-plugin@"^3.2.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! See C:\Users\OBIORA JUSTICE\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\OBIORA JUSTICE\AppData\Local\npm-cache\_logs\2022-09-26T09_37_37_869Z-debug-0.log发布于 2022-09-26 09:23:22
在依赖项中指定的css-loader版本适用于Webpack 4,但也取决于Webpack 5。
将css-loader中的package.json升级到较新的版本(例如,6.7.1,当前版本),然后再试一次。
https://stackoverflow.com/questions/73852019
复制相似问题