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.7.0 tries to check v1.8.0 #188

Closed Valthek closed 9 months ago

Valthek commented 1 year ago

I have an app on Angular 15, using v 1.7.0 of this library. By default npm will use ^ when installing a package, thus having a minor version increase that relies on a major version increase for Angular will cause breaking changes in many people's builds, rendering the older version incompatible without specific configuration.

npm ERR! While resolving: emut-web@0.0.0 npm ERR! Found: @angular/common@15.2.9 npm ERR! node_modules/@angular/common npm ERR! @angular/common@"^15.2.0" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @angular/common@"^16.0.0" from angular-google-tag-manager@1.8.0 npm ERR! node_modules/angular-google-tag-manager npm ERR! angular-google-tag-manager@"^1.7.0" 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. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! C:\npm\cache\_logs\2023-06-28T14_25_17_479Z-eresolve-report.txt

Suggested fix would be to increment the major version when releasing for a new version of Angular, conform with the guidelines of semantic versioning. https://semver.org/ "MINOR version when you add functionality in a backward compatible manner."