Ngx-bootstrap: can't resolve rxjs/Observable in tooltip

Created on 4 May 2018  路  10Comments  路  Source: valor-software/ngx-bootstrap

created fresh angular-cli project (v6.0), installed ngx-bootstrap as per instructions, getting the following error:

ERROR in ./node_modules/ngx-bootstrap/tooltip/tooltip.directive.js
Module not found: Error: Can't resolve 'rxjs/Observable' in 'd:\data\dev\SubHouseHolding\ng2Appnode_modules\ngx-bootstrap\tooltip'
ERROR in ./node_modules/ngx-bootstrap/tooltip/tooltip.directive.js
Module not found: Error: Can't resolve 'rxjs/add/observable/timer' in 'd:\data\dev\SubHouseHolding\ng2Appnode_modules\ngx-bootstrap\tooltip'

Bug description or feature request:

Plunker/StackBlitz that reproduces the issue:

Using Plunkr, StackBlitz is the best way to show your issue. Issues without link to an example of reproduction might be closed.

You can use one of starter templates:

Plunkr: https://plnkr.co/edit/0NipkZrnckZZROAcnjzB?p=preview

StackBlitz: https://stackblitz.com/edit/ngx-bootstrap?file=app%2Fapp.module.ts

Versions of ngx-bootstrap, Angular, and Bootstrap:

ngx-bootstrap: 2.04

Angular: 6

Bootstrap: 4

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

angular-cli v6

from package.json:
"dependencies": {
"@angular/animations": "^6.0.0",
"@angular/common": "^6.0.0",
"@angular/compiler": "^6.0.0",
"@angular/core": "^6.0.0",
"@angular/forms": "^6.0.0",
"@angular/http": "^6.0.0",
"@angular/platform-browser": "^6.0.0",
"@angular/platform-browser-dynamic": "^6.0.0",
"@angular/router": "^6.0.0",
"bootstrap": "^4.1.1",
"core-js": "^2.5.4",
"font-awesome": "^4.7.0",
"jquery": "^3.3.1",
"lodash": "^4.17.10",
"moment": "^2.22.1",
"ngx-bootstrap": "^2.0.4",
"rxjs": "^6.1.0",
"zone.js": "^0.8.26"
},

Most helpful comment

I'm install rxjs-compat package and it works for me.

All 10 comments

The new version of Angular uses RxJs 6 and that breaks a bunch of code, all projects need to implement the migration guide and update the typings.

Do you guys have a time when Angular/rxjs 6 will be supported?

Any update on this?

I'm install rxjs-compat package and it works for me.

+1 to installing rxjs-compat and now compiles without error

+1 to installing rxjs-compat and now compiles without error

you just install or use this 'npm i rxjs-compat' command and start again your app na-serve

Running into error:
ERROR in node_modules/ngx-bootstrap/mini-ngrx/store.class.d.ts(8,43): error TS2689: Cannot extend an interface 'Observable'. Did you mean 'implements'?

Even with the rxjs-compat module.

Any guidance?

EDIT: Adding "skipLibCheck": true to tsconfig.json got it to at least compile.

Ngx bootstrap v3 with rxjs 6 and angular 6 will be released today

I don't know if this is related in some way but when I specify a delay in the tooltip directive line 224 throws the error: "timer is not defined": var _timer_1 = timer(this.delay).subscribe(function () {. the timer variable is set using an import: import { timer } from 'rxjs';. I get no errors when I compile but I can't use the delay attribute. I'm using angular 5.2. Will try upgrading to 6.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haisaco picture haisaco  路  3Comments

ctrl-brk picture ctrl-brk  路  3Comments

PascalHonegger picture PascalHonegger  路  3Comments

tpiros picture tpiros  路  3Comments

KimBum picture KimBum  路  3Comments