1

I have the following dependencies in my package.json :

"dependencies": {
 "@angular/animations": "~12.1.0",
 "@angular/common": "~12.1.0",
 "@angular/compiler": "~12.1.0",
 "@angular/core": "~12.1.0",
 "angulartics2": "^11.0.0",
 "rxjs": "~6.6.0",
 "zone.js": "~0.11.4"
},
"devDependencies": {
 "@angular/cli": "~12.1.4",
 "@angular/compiler-cli": "~12.1.0",
 "tslint": "~6.1.3",
 "typescript": "~4.3.2"
}

According to this gist, Angular 12.1.x is only compatible with rxjs 6.5.x/6.6.x
And according to the angulartics npm page, I should use angulartics 11.0.0 for Angular 12.x.

But when I launch my npm install I got the following error :

npm ERR! Could not resolve dependency:
npm ERR! peer rxjs@"^7.0.0" from angulartics2@11.0.0
npm ERR! node_modules/angulartics2
npm ERR!   angulartics2@"^11.0.0" from the root project

So basically it is expecting rxj@^7.0.0, but it's not compatible with my Angular version.
What are my best options ?

iPPle
  • 126
  • 1
  • 10

1 Answers1

1

I think the best option is to updated to angular v13 (or v14) and use the latest version of angulartics and the latest version of RxJS.

updating angular to the lastest versions has benefits ;)

Zerotwelve
  • 2,087
  • 1
  • 9
  • 24
  • It is a quite large project in my company. I can't update to major versions for this project. But i can try to upgrade to the minor version 12.2. Should I use `ng update` ? – iPPle Jun 21 '22 at 09:08
  • 1
    idk if that would make a big difference... otherwise you can use an older version of angulartics2 or fork the Project and correct the code in order to allow RxJS 6 – Zerotwelve Jun 21 '22 at 09:35