[Testing with readFirst] Observable type error on nx version 15.0.6 and above
See original GitHub issueHi,
I have an angular application and am currently on nx version 15.0.5 with rxjs version 7.5.6 and have the problem that the unit test fail when I update to all the newer patch versions.
Current Behavior
The unit test fail on the readFirst, as it seems that the Observable import is not the same as the Observable import of rxjs, which confuses me. The exact error:
Argument of type ‘import(“/…/node_modules/rxjs/dist/types/internal/Observable”).Observable<boolean>’ is not assignable to parameter of type ‘import(“/…/node_modules/@nrwl/angular/node_modules/rxjs/internal/Observable”).Observable<boolean>’.
Type ‘Observable<boolean>’ is missing the following properties from type ‘Observable<boolean>’: _isScalar, _trySubscribe, _subscribe
Expected Behavior
No type error, unit test succeeds just like in nx version 15.0.5.
Steps to Reproduce
Use readFirst for a unit test in nx version 15.0.6 or above.
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (2 by maintainers)

Top Related StackOverflow Question
Yes, you are right @Coly010! I forgot completely the
firstValueFromoperator 😄. I think that I will replace it everywhere.You might be able to use the
firstValueFromoperator from RxJS itself https://rxjs.dev/api/index/function/firstValueFrom