Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I exclude a peer dependency from ng update?

I'm trying to upgrade a project from Angular 7 to 8. When running ng update @angular/cli @angular/core, I get the following error:

Package "@swimlane/ngx-charts" has an incompatible peer dependency to "zone.js" (requires "^0.8.26", would install "0.9.1").

Is there a way to exclude zone.js from my ng update? It's already on 0.8.26.

like image 494
Matt123 Avatar asked Oct 22 '25 17:10

Matt123


1 Answers

The ng update will update the zone.js for version 0.9.1, not 0.8.26. That's the current version (read the error message carefully).

The issue is with the npm package '@swimlane/ngx-charts', the current version requires zone.js version ^0.8.26, and the update will install the 0.9.1 version, which is not compatible with the current version of the package.

Simply uninstall and install the package:

npm uninstall @swimlane/ngx-charts
npm install @swimlane/ngx-charts
like image 168
Max Amorim Avatar answered Oct 25 '25 09:10

Max Amorim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!