angular-gridster2.mjs , Error: export 'debounceTime' (imported as 'debounceTime') was not found in 'rxjs'

876 Views Asked by At

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.

2

There are 2 best solutions below

2
On BEST ANSWER

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"
0
On

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

Solution reference link