javascript - NPM:如何处理看似冲突的依赖关系?
问题描述
运行 npm 后,我得到了似乎有冲突的依赖要求。
例如,对于 uglifyjs-webpack-plugin@0.4.6,webpack 必须是 ^1.9 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3.0.0 而对于 webpack-dev-middleware@3.7.2 它必须是更高版本 (^4.0.0)
我的新手问题是
- 我假设可能没有适合所有要求的通用版本是正确的?
- 如果情况 1) 为真,如何处理这个(看似)冲突的要求?最佳做法是什么?
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\watchpack-chokidar2\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\webpack-dev-server\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules\@ionic\app-scripts\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules\@ionic\app-scripts\node_modules\watchpack\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN ajv-keywords@3.5.2 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN @angular-devkit/build-webpack@0.1102.8 requires a peer of webpack@^4.6.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ngtools/webpack@11.2.8 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN webpack-dev-middleware@3.7.2 requires a peer of webpack@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN dotenv-webpack@1.8.0 requires a peer of webpack@^1 || ^2 || ^3 || ^4 but none is installed. You must install peer dependencies yourself.
npm WARN tslint-eslint-rules@4.1.1 requires a peer of tslint@^5.0.0 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.
解决方案
推荐阅读
- java - 如何在按钮上方制作视图(最小 SDK:17)
- javascript - DOM 事件 API JavaScript
- c++ - 如何在 CImg 中将像素数据作为矩阵/向量获取?
- mysql - 下面的mysql查询有什么问题
- r - 如果满足另一行的条件,则删除组内的行
- java - spring security 没有调用 loadUserByUsername() 方法
- scala - UDF Scala 火花语法
- python - 下载文件时的Python多处理比正常实现慢
- c++ - 修改 std::valarray 的元素是否安全
同时? - ios - 基于屏幕(超级视图)高度的 iOS 顶部对齐约束