2

I have upgraded my angular version from 12 to 14.

After that I have received many error which I resolved but in the end I for the following error I'm not sure what I should do. The angular-gridster2.mjs is one of the packages that has installed and is in the nodemodules.

enter image description here

I also have updated the rxjs and rxjs-compat as follow:

 "rxjs": "^6.6.7",
 "rxjs-compat": "^6.6.7",

does any one has any idea what could be the problem?

I have tried to downgrade the gridster2 and also rxjs.

Shide
  • 25
  • 4

2 Answers2

1

I solved this issue by upgrading the RxJS library to v7.5.5.

Solution reference link

Karthikeyan Vellingiri
  • 1,270
  • 1
  • 17
  • 26
0

The operator functions are not exported under rxjs in this RxJS version. They are located under rxjs/operators.

// "rxjs": "^6.6.7",
import { debounceTime } from "rxjs/operators"

If you can't change the imports, you may upgrade RxJS to the latest version.

// "rxjs": "^7.5.7",
import { debounceTime } from "rxjs"
Tobias S.
  • 21,159
  • 4
  • 27
  • 45
  • angular-gridster2.mjs file is in nodemodules and Im not be able to modify the import inside this file. is this what you mean? I guess this is s.th that should be fixed inside the package (angular-gridster2) itself – Shide Nov 08 '22 at 20:29
  • @Shide - Ah I see now. Those errors originate in files you did not write. In this case you cant change the import here. Another option would be to upgrade rxjs to a version larger than `7.5`. There, the import via `rxjs` is possible again. – Tobias S. Nov 08 '22 at 20:33