ngx-errors 和 angular6:无法解决 rxjs/Observable

ngx-errors and angular6: Can´t resolve rxjs/Observable

我正在尝试使用 Angular 6 创建一个应用程序并使用 NGX-Erros 模块。我已经将 rxjs 导入更新为:

import { Observable, Subject, pipe,of  } from 'rxjs';
import { map, takeUntil, tap, catchError } from 'rxjs/operators';

而且我仍然收到此错误: ./node_modules/@ultimate/ngxerrors/src/ngxerror.directive.js 中的错误无法解析 'rxjs/Observable'

那是因为 ngx-errors 库不是最新的 RxJS 6 (deep imports part), check here 你会看到旧的导入方式,这就是输出控制台告诉你的你 exaclty 因为它指向你安装的 Rxjs 版本(在你的 package.json 中提到)。