FERNman/angular-google-charts

Angular 16 support

rr-hornback opened this issue ยท 9 comments

Bug Report

Please answer the following questions for yourself before submitting an issue.
YOU MAY DELETE THE PREREQUISITES SECTION.

  • [ x] I am running the latest version
  • [ x] I checked the Readme and found no answer
  • [ x] I checked to make sure that this issue has not already been filed
  • [ x] This is related to angular-google-charts and not to Google Charts directly (if it's a Google Charts issue, their forum may help)

@rr-hornback - I am also facing the same issue.
I am trying to upgrade my project to Angular v16 but due to incompatible version issues of this package, I am not able to do this.

Have you tried adapting the workaround described for Angular 15?
#292 (comment)

@kussmaul - Yes I tried that as well but unfortunately did not work for me.

We are currently using the overrides in our package.json file as a temporary workaround. Would be nice to have an officially supported version.

"overrides": { "angular-google-charts": { "@angular/common": "^16.0.3", "@angular/core": "^16.0.3" } }

@rr-hornback - I added overrides in my package.json file but I am still getting the same error.

You might get more specific suggestions if you provide more detail than "the same error" - exactly what error do you get? What is your package.json? What else have you tried? (see the bug report template for more)

@rr-hornback - I added overrides in my package.json file but I am still getting the same error.

Same error even with the override in package.json

Package "angular-google-charts" has an incompatible peer dependency to "@angular/common" (requires ">=6.0.0 <=14.x.x" (extended), would install "16.0.4").
                  Package "angular-google-charts" has an incompatible peer dependency to "@angular/core" (requires ">=6.0.0 <=14.x.x" (extended), would install "16.0.4").
โœ– Migration failed: Incompatible peer dependencies found.
Peer dependency warnings when installing dependencies means that those dependencies might not work correctly together.
You can use the '--force' option to ignore incompatible peer dependencies and instead address these warnings later.
  See "/tmp/ng-JYz5dg/angular-errors.log" for further details.

The only way to make it work is to use the --force option in the ng update command.

We are currently using the overrides in our package.json file as a temporary workaround. Would be nice to have an officially supported version.

"overrides": { "angular-google-charts": { "@angular/common": "^16.0.3", "@angular/core": "^16.0.3" } }

That works for me, just add @angular/common and @angular/core versions as same as in your package.json.