npm ERR! ERESOLVE: Dependency Conflict Resolution Error
This error message indicates that there's a dependency conflict in your project. Specifically, there's a conflict between the version of 'webpack' required by the '@soda/friendly-errors-webpack-plugin' and '@vue/cli-plugin-babel' packages (which require webpack 4 or 5), and the version of 'uglifyjs-webpack-plugin' required by your project (which specifically requires webpack 4.46.0).
To resolve this conflict, try these steps:
-
Update dependencies for compatibility: Update the versions of '@soda/friendly-errors-webpack-plugin' and '@vue/cli-plugin-babel' to versions compatible with 'uglifyjs-webpack-plugin' 2.2.0. Refer to the documentation of each package for compatible versions.
-
Force or legacy dependency resolution (not recommended): Use the '--force' or '--legacy-peer-deps' options with your 'npm install' command to accept an incompatible resolution. However, this is not recommended as it might lead to unexpected behavior or errors.
-
Manually resolve the conflict: Modify your project's 'package.json' file to specify a specific version of 'webpack' compatible with all your dependencies. Experiment with different versions to find a working solution.
Once you've resolved the dependency conflict, you should be able to run your project without encountering the ERESOLVE error.
原文地址: https://www.cveoy.top/t/topic/oqcd 著作权归作者所有。请勿转载和采集!