TypeError: rxjs_1.of is not a function
See original GitHub issuefollowings are the version details
"ngx-cacheable": "^1.0.6", "@angular/common": "^4.0.0", "@angular/compiler": "^4.0.0", "@angular/core": "^4.3.4", "@angular/forms": "^4.0.0", "@angular/http": "^4.0.0", "rxjs": "^5.1.0",
I have added @Cacheable
decorator in user.service.ts file as below
import { Cacheable } from 'ngx-cacheable';
...
@Cacheable()
getUserDetail(): Observable<any> {
return this.httpClient
.get<UserResponse>(`/user/profile`, { withCredentials: true })
.map((res) => res.item);
}
bit it throw errors
ERROR TypeError: rxjs_1.of is not a function at UserService.propertyDescriptor.value [as getUserDetail] (cacheable.decorator.js:60) at ProfileComponent.getUserDetail (profile.component.ts:73) at ProfileComponent.ngAfterViewInit (profile.component.ts:60) at callProviderLifecycles (core.es5.js:11176) at callElementProvidersLifecycles (core.es5.js:11147) at callLifecycleHooksChildrenFirst (core.es5.js:11131) at checkAndUpdateView (core.es5.js:12259) at callViewAction (core.es5.js:12599) at execEmbeddedViewsAction (core.es5.js:12557) at checkAndUpdateView (core.es5.js:12252)
What is the reason and how to solve it?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
TypeError: rxjs_1.lastValueFrom is not a function
I get an error TypeError: rxjs_1.lastValueFrom is not a function with but no error when I exclude TypeOrmModule.forRoot({}) .
Read more >nestjs知识系列:(0 , rxjs_1.lastValueFrom) is not a function
Uncaught TypeError: (intermediate value)(…) is not a function (function ($) { console.log($('div').html()) })(jQuery) (function ($) { console.
Read more >typeerror: (0 , rxjs_1.lastvaluefrom) is not a function
rxjs_1.lastvaluefrom is not a function ; 1. # If you're using Nest v8, RxJS version 7 is used, ; 2. # which no...
Read more >Importing RXJS Observable functions in Angular 5 - Medium
Got invalid session form error %j TypeError: r.a.timer is not a function at t.addTimeout (main.e71224f07831269c596d.bundle.js:1).
Read more >Ionic 3 TypeError:_rxjs_Observable__.Observable.fromEvent ...
Observable.fromEvent is not a function TypeError: __WEBPACK_IMPORTED_MODULE_2_rxjs_Observable__.Observable.fromEvent is not a function at new ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Maybe the version of rxjs 🤔 @Cacheable need
6.2.0
and you use5.1.1
Sorry just saw the rxjs version. Yeh I am using “rxjs”: “^5.5.2”, @Cacheable need 6.2.0 and you use 5.1.1 ( I would put this in the project homepage) 😃
Thanks & all the best!