Ngx-bootstrap: Observable.timer is not a function

Created on 19 Jan 2018  路  10Comments  路  Source: valor-software/ngx-bootstrap

Bug description or feature request:

Having this issue after compiling (angular universal project):

main.091dff259031a445e6b8.bundle.js:1 ERROR TypeError: Fe.Observable.timer is not a function
    at e.project (main.091dff259031a445e6b8.bundle.js:1)
    at e._next (main.091dff259031a445e6b8.bundle.js:1)
    at e.next (main.091dff259031a445e6b8.bundle.js:1)
    at e.next (main.091dff259031a445e6b8.bundle.js:1)
    at t.start (main.091dff259031a445e6b8.bundle.js:1)
    at t.intercept (main.091dff259031a445e6b8.bundle.js:1)
    at t.handle (main.091dff259031a445e6b8.bundle.js:1)
    at t.intercept (main.091dff259031a445e6b8.bundle.js:1)
    at t.handle (main.091dff259031a445e6b8.bundle.js:1)
    at t.intercept (main.091dff259031a445e6b8.bundle.js:1)

I had same issue with other package and it seems is regarding the way Observable timer is imported( it seems it was changed).

In the other package I was able to rebuild and change the import as follows:

import { timer } from 'rxjs/observable/timer';

Versions of ngx-bootstrap, Angular, and Bootstrap:

ngx-bootstrap:
2.0.0-rc.1
Angular: 5.2.1
Bootstrap: 4.0

Build system: Angular CLI, System.js, webpack, starter seed:

webpack

comp(build) env(server) reproduce

Most helpful comment

I have a same issue, I have solved it by adding the following import to my file:

import 'rxjs/add/observable/timer';

All 10 comments

Which version of rxjs do you have?

rxjs version 5.5.6

I am also facing this issue. Any update on this? @randomparanoia are you able to solve it?

I rolled back to 2.0.0-rc.0 for now, until a fix shows up. A possible fix is what I stated on opening message.

You are talking about this right?
import { timer } from 'rxjs/observable/timer'; Have you tried with this in your code?

Works fine on our universal demo with 5.5.6. Could you provide a repo with reproduction?

Not at moment. Will try to reproduce in a clean repo and share with you. Also a heads up: in v2.0.1 issue still present.

Update: Built a clean repo and I was unable to reproduce... downgraded my app rxjs version to 5.5.4 and it fixed for now...

ngx-bootstrap latest, angular cli 1.6.7 and latest version of angular error has gone... CLosing. Thanks

I have a same issue, I have solved it by adding the following import to my file:

import 'rxjs/add/observable/timer';

same issue on angular 5 and ionic latest which i guess 4, but this happens really random sometimes time object is working fine and some times it is not.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MrBlaise picture MrBlaise  路  3Comments

PascalHonegger picture PascalHonegger  路  3Comments

RolfVeinoeSorensen picture RolfVeinoeSorensen  路  3Comments

tpiros picture tpiros  路  3Comments

MihaiHoriaPopescu picture MihaiHoriaPopescu  路  3Comments