Попытка импортировать некоторые наблюдаемые модули в угловой версии 6. Это модули, которые я пытаюсь импортировать:
import { BehaviorSubject } from "rxjs/BehaviorSubject";
import { observable } from "rxjs/Rx";
import { of } from "rxjs/observable/of";
Я получаю эту ошибку:
ERROR in node_modules/rxjs/BehaviorSubject.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/BehaviorSubject'.
node_modules/rxjs/Rx.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat'.
node_modules/rxjs/observable/of.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/observable/of'.
src/app/services/log.service.ts(3,10): error TS2305: Module '"C:/Users/mendi/OneDrive/Desktop/Websites/training/Udemy Course angular/sandbox/devlogger/node_modules/rxjs/BehaviorSubject"' has no exported member 'BehaviorSubject'.
src/app/services/log.service.ts(4,10): error TS2305: Module '"C:/Users/mendi/OneDrive/Desktop/Websites/training/Udemy Course angular/sandbox/devlogger/node_modules/rxjs/Rx"' has no exported member 'Observable'.
src/app/services/log.service.ts(5,10): error TS2305: Module '"C:/Users/mendi/OneDrive/Desktop/Websites/training/Udemy Course angular/sandbox/devlogger/node_modules/rxjs/observable/of"' has no exported member 'of'.
ERROR in node_modules/rxjs/BehaviorSubject.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/BehaviorSubject'.
node_modules/rxjs/Rx.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat'.
node_modules/rxjs/observable/of.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/observable/of'.
src/app/services/log.service.ts(3,10): error TS2305: Module '"C:/Users/mendi/OneDrive/Desktop/Websites/training/Udemy Course angular/sandbox/devlogger/node_modules/rxjs/BehaviorSubject"' has no exported member 'BehaviorSubject'.
src/app/services/log.service.ts(4,10): error TS2305: Module '"C:/Users/mendi/OneDrive/Desktop/Websites/training/Udemy Course angular/sandbox/devlogger/node_modules/rxjs/Rx"' has no exported member 'Observable'.
src/app/services/log.service.ts(5,10): error TS2305: Module '"C:/Users/mendi/OneDrive/Desktop/Websites/training/Udemy Course angular/sandbox/devlogger/node_modules/rxjs/observable/of"' has no exported member 'of'.
некоторая информация омоя версия:
Angular CLI: 6.0.8
Node: 8.11.1
OS: win32 x64
Angular: 6.1.10
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.6.8
@angular-devkit/build-angular 0.6.8
@angular-devkit/build-optimizer 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@angular/cli 6.0.8
@ngtools/webpack 6.0.8
@schematics/angular 0.6.8
@schematics/update 0.6.8
rxjs 6.3.3
typescript 2.7.2
webpack 4.8.3
не может скомпилироваться.
что мне делать?