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
136 stars 78 forks source link

Unable to resolve dependency tree - v1.6.1 tries to check v1.7.0 #173

Closed pgrzego closed 9 months ago

pgrzego commented 1 year ago

I have an app with angular v14.2. This should work fine with angular-google-tag-manager@"^1.6.1" that I have declared in my package.json file, but this is what I get:

npm ERR! While resolving: wenow-dashboard@2.1.1
npm ERR! Found: @angular/common@14.2.12
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^14.2.9" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^15.0.0" from angular-google-tag-manager@1.7.0
npm ERR! node_modules/angular-google-tag-manager
npm ERR!   angular-google-tag-manager@"^1.6.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
Valthek commented 1 year ago

For anyone who stumbles upon this issue in the future: This package only increments their minor version when releasing for a new version of Angular. Suggested fix for end-users is to use '~' instead of ^ in the package.json to ensure only patch version is ever increased.