question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: rxjs_1.of is not a function

See original GitHub issue

followings 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:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
ThibaudAVcommented, Aug 21, 2018

Maybe the version of rxjs 🤔 @Cacheable need 6.2.0 and you use 5.1.1

1reaction
itaiRoded2commented, Feb 1, 2019

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found