ngx-bootstrap icon indicating copy to clipboard operation
ngx-bootstrap copied to clipboard

can't resolve rxjs/Observable in tooltip

Open keslavi opened this issue 8 years ago • 10 comments

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\ng2App\node_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\ng2App\node_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" },

keslavi avatar May 04 '18 17:05 keslavi

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.

LordShiroe avatar May 04 '18 20:05 LordShiroe

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

lacera-ep avatar May 07 '18 00:05 lacera-ep

Any update on this?

shelomovskiy avatar May 08 '18 09:05 shelomovskiy

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

benj0c avatar May 08 '18 10:05 benj0c

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

Matticusau avatar May 08 '18 13:05 Matticusau

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

wahajahmed avatar May 08 '18 18:05 wahajahmed

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

sayed021 avatar May 09 '18 10:05 sayed021

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.

jbarracca avatar May 09 '18 20:05 jbarracca

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

valorkin avatar May 14 '18 09:05 valorkin

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.

dsmileym4 avatar Jul 27 '18 16:07 dsmileym4