简体   繁体   English

升级Angular 6时的Webpack警告

[英]Webpack warning when upgrading Angular 6

I upgraded Angular from version 6.0.0 to 6.1.3. 我将Angular从6.0.0版本升级到6.1.3。 After running ng update @angular/core I got the following warning: 运行ng update @angular/core我得到以下警告:

npm WARN @ngtools/webpack@6.0.8 requires a peer of typescript@~2.4.0 || 
~2.5.0 || ~2.6.0 || ~2.7.0 but none is installed. You must install 
peer dependencies yourself.

What is the meaning of peer of typescript ? peer of typescriptpeer of typescript什么意思? According to ng -version , typescript is installed. 根据ng -version ,安装了typescript。 What's the version @ngtools/webpack is looking for? @ngtools/webpack正在寻找什么版本?

ng -version: ng -version:

Angular CLI: 6.1.4
Node: 8.9.1
OS: win32 x64
Angular: 6.1.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.8
@angular-devkit/build-angular     0.6.8
@angular-devkit/build-optimizer   0.6.8
@angular-devkit/core              0.6.8
@angular-devkit/schematics        0.7.4
@angular/cli                      6.1.4
@ngtools/webpack                  6.0.8
@schematics/angular               0.7.4
@schematics/update                0.7.4
rxjs                              6.2.2
typescript                        2.9.2
webpack                           4.8.3

将“ @ angular-devkit / build-angular”更新为0.7.4以修复上述错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM