安装webpack和webpack-cli时出现的问题:
npm WARN webpack-cli@3.3.11 requires a peer of webpack@4.x.x but none is installed. You must install peer dependencies yourself.

问题翻译::
NPMWA RNwebpack-cli@3.3.11需要一个webpack@4.x.x的对等点,但没有安装。您必须自己安装对等依赖项。

原因:
安装时命令:npm install webpack -g
npm install webpack-cli -g
默认安装了webpack最新版本,导致安装的最新脚手架webpack-cli与webpack版本不匹配,导致安装错误
解决:

  1. 指定webpack安装版本:
         npm install webpack@4.30.0 -g
  1. 指定webpack安装的版本如下:
         npm install webpack-cli@3.3.2 -g
  1. 安装成功:
PS D:\developer\IdeaProjects\itcast-nodejs> npm install webpack@4.30.0 -g
D:\developer\node.js\npm_modules\webpack -> D:\developer\node.js\npm_modules\node_modules\webpack\bin\webpack.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.11 (node_modules\webpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})+ webpack@4.30.0
added 323 packages from 198 contributors in 27.276s
PS D:\developer\IdeaProjects\itcast-nodejs> npm install webpack-cli@3.3.2 -g
D:\developer\node.js\npm_modules\webpack-cli -> D:\developer\node.js\npm_modules\node_modules\webpack-cli\bin\cli.js> webpack-cli@3.3.2 postinstall D:\developer\node.js\npm_modules\node_modules\webpack-cli
> node ./bin/opencollective.js**Thanks for using Webpack!Please consider donating to our Open Collectiveto help us maintain this package.**Donate: https://opencollective.com/webpack/donatenpm WARN webpack-cli@3.3.2 requires a peer of webpack@4.x.x but none is installed. You must install peer dependencies yourself.+ webpack-cli@3.3.2
added 206 packages from 126 contributors in 18.13s
在这里插入代码片

npm WARN webpack-cli@3.3.11 requires a peer of webpack@4.x.x but none is installed. You must install相关推荐

  1. npm WARN ajv-keywords@3.5.2 requires a peer of ajv@^6.9.1 but none is installed. You must install pe

    1.问题: Your global`在这里插入代码片` Angular CLI version (12.1.1) is greater than your local version (11.2.14 ...

  2. npm WARN ajv-keywords@3.1.0 requires a peer of ajv@^6.0.0 but none is installed. You must install pe

    npm install 依赖警告 npm WARN ajv-keywords@3.1.0 requires a peer of ajv@^6.0.0 but none is installed. Yo ...

  3. ajv-keywords@3.5.2 requires a peer of ajv@^6.9.1 but none is installed. You must install peer depend

    今天使用vue,版本问题一直很烦人,sass版本不对,但是直接安装又报错,我们先安装ajv,在安装sass,注意自己需要的版本号 ajv-keywords@3.5.2 requires a peer ...

  4. npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. You must install pe

    转自:https://www.cnblogs.com/init-007/p/10894795.html 解决: npm install -g npm-install-peers npm install ...

  5. npm安装webpack时,报错npm WARN ajv-keywords@3.1.0 requires a peer of ajv@^6.0.0 but none is installed.

    npm WARN ajv-keywords@3.1.0 requires a peer of ajv@^6.0.0 but none is installed. You must install pe ...

  6. npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed.

    今天使用npm install 时一直发现有个WARN 作为一名稍微有代码洁癖和警告排障者来说 实在是不能忍 WARN信息:npm WARN ajv-keywords@3.2.0 requires a ...

  7. npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed

    npm安装easymock的依赖出错: npm WARN ajv-keywords@2.1.1 requires a peer of ajv@^5.0.0 but none is installed. ...

  8. npm install报错,npm WARN ajv-keywords@3.4.0 requires a peer of ajv@^6.9.1 but none is installed. You m

    报错 npm WARN ajv-keywords@3.4.0 requires a peer of ajv@^6.9.1 but none is installed. You must install ...

  9. npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed

    npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install pe ...

最新文章

  1. 写代码时发现......还得是 SpringBoot !一篇拿下
  2. 新型冠状病毒心理防护手册(大众版)
  3. isolate-user-vlan隔离用户vlan的配置
  4. Charpter 8:Declarative Middleware Using AOP:expert one-on-one J2EE Development without EJB.(读后感)...
  5. HDU - 5008 Boring String Problem(后缀数组+二分)
  6. Tween Animation----Translate位置移动动画
  7. [转]STL的内存分配器
  8. python怎么设置画布颜色_如何在kivy python中动态更改画布颜色?
  9. 一纸书来只为墙,让他三尺又何妨?长城万里今犹在,不见当年秦始皇。
  10. 数学建模学习之模糊评价法
  11. 2008中国优秀无线互联网站点50强
  12. UOJ275 [清华集训2016] 组合数问题 【Lucas定理】【数位DP】
  13. LiveCharts
  14. 同城双活与异地多活架构分析
  15. 网易互娱2022校园招聘在线笔试 -《魔塔》
  16. 消息称GPhone今日发布 揭秘幕后教父(图)
  17. 天数智芯亮相2019世界人工智能大会 软硬协同深耕AI极致算力
  18. h5页面在新版微信iOS 端出现底部白色导航条
  19. iOS | 模拟器调试Web控制台空白问题及解决
  20. 备份与还原相关的基本概念

热门文章

  1. 【Java语言】项目实践:汽车租赁系统(源码)(面向对象方法)
  2. 2021年中国驴行业存栏量延续下降走势,存栏基数降低使得驴肉供应减少,价格持续走强[图]
  3. 食管癌术后患者要怎么进食才科学?
  4. Shopee怎么发货?虾皮无货源怎么发货?
  5. 计算机专业的,颜值很高是一种怎样的赶脚?
  6. ERP实施工程师必备知识体系及职业操守
  7. android switch模块
  8. 斗地主发牌及排序流程
  9. 成语接龙(英语单词链)
  10. 获取员工其当前的薪水比其manager当前薪水还高的相关信息--2-5