我正在使用此命令ng update @angular/cli @angular/corefor
将角度版本从6更新到8,但这显示了以下波纹问题。
Package "@nguniversal/module-map-ngfactory-loader" has an incompatible peer dependency to "@angular/core" (requires ">=7.0.0-rc.0 <8.0.0||>=6.0.0-rc.0 <7.0.0", would install "8.2.5").
Package "@nguniversal/module-map-ngfactory-loader" has an incompatible peer dependency to "@angular/common" (requires ">=7.0.0-rc.0 <8.0.0||>=6.0.0-rc.0 <7.0.0", would install "8.2.5").
Package "@nguniversal/module-map-ngfactory-loader" has an incompatible peer dependency to "@angular/platform-server" (requires ">=7.0.0-rc.0 <8.0.0||>=6.0.0-rc.0 <7.0.0", would install "8.2.5").
发现不兼容的对等项依赖关系。见上文。
答案 0 :(得分:2)
从Angular 8.2升级到10时,我收到了类似的错误。正在运行:
npm uninstall @nguniversal/module-map-ngfactory-loader
然后ng update对我有用。
答案 1 :(得分:1)
首先,从最后一个开始一个接一个地检查依赖性,并使用下面的代码作为示例:
npm卸载@ angular / http
再次使用:
ng更新@ angular / cli @ angular / core
现在,您必须检查什么是依赖项,然后一一删除,毕竟,您将看到代码将被更新。
然后从上一个依赖项开始,您必须安装新版本的依赖项。