mzuccaroli / angular-google-tag-manager

A service library for integrate google tag manager in your angular project
https://itnext.io/how-to-add-google-tag-manager-to-an-angular-application-fc68624386e2
MIT License
138 stars 78 forks source link

Angular 14.0.1 support #144

Closed furknyavuz closed 2 years ago

furknyavuz commented 2 years ago

Hi, I updated my angular version to 14.0.1 in my project, and this package stopped working. It is not supporting the angular 14.0.1 version.

Updating the angular version worked fine for us in our packages. So it may work for this repository too. For the reference: https://github.com/open-template-hub/animated-code-editor

Console message:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: company-profile-ui-template@4.0.8
npm ERR! Found: @angular/common@14.0.1
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^14.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^13.1.1" from angular-google-tag-manager@1.5.1
npm ERR! node_modules/angular-google-tag-manager
npm ERR!   angular-google-tag-manager@"^1.5.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Thanks 👍

Swamp3 commented 2 years ago

just created this pr for Angular 14 support https://github.com/mzuccaroli/angular-google-tag-manager/pull/145

furknyavuz commented 2 years ago

Thanks!

Swamp3 commented 2 years ago

until the PR is merged you can define this in your package.json (npm>= 8.3.0)

  "overrides": {
    "angular-google-tag-manager": {
      "@angular/common": "14.0.2",
      "@angular/compiler": "14.0.2"
    }
  }