在尝试进行npm安装时,我遇到对等依赖性错误。这些错误从要求一组值到另一组,然后又回到前一组。甚至安装了这两个依赖项的整个集合也会得到相同的结果
npm安装
npm WARN css-loader@1.0.0 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN html-webpack-plugin@4.0.0-alpha.2 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN mini-css-extract-plugin@0.4.3 requires a peer of webpack@^4.4.0 but none is installed. You must install peer dependencies yourself.
npm WARN optimize-css-assets-webpack-plugin@5.0.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN terser-webpack-plugin@1.1.0 requires a peer of webpack@^4.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN url-loader@1.1.1 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware@3.4.0 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-server@3.1.14 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
然后尝试使用npm install --save-dev "webpack@^4.0.0" "webpack@^4.3.0" "webpack@^4.4.0"
npm WARN @jpmorganchase/perspective@0.2.12 requires a peer of webpack@>=3.5 <4 but none is installed. You must install peer dependencies yourself.
npm WARN uglifyjs-webpack-plugin@0.4.6 requires a peer of webpack@^1.9 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN extract-text-webpack-plugin@3.0.2 requires a peer of webpack@^3.1.0 but none is installed. You must install peer dependencies yourself.
然后我尝试npm install --save-dev "webpack@>=3.5 <4" "webpack@^1.9 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3.0.0" "webpack@^3.1.0 webpack@^4.0.0" "webpack@^4.3.0" "webpack@^4.4.0"
无济于事。再次看到第一组错误
我什至尝试删除安装(^ 1.9 || ^ 2 || ^ 2.1.0)中的条件,并用确切的版本替换它们,但这无法脱离循环。