0

我更新到 Angular 6。没有安装 rxjs-compat。更改我的代码

import {Observable} from "rxjs/Observable";

import {Observable} from "rxjs";

等等。
但是如果我做服务我会得到一个错误

ERROR in node_modules/primeng/components/accordion/accordion.d.ts(4,10): error TS2305: Module '"../JetBrains/WebstormProjects/test5/node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
node_modules/primeng/components/common/confirmationservice.d.ts(1,10): error TS2305: Module '"../JetBrains/WebstormProjects/test5/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/primeng/components/common/messageservice.d.ts(1,10): error TS2305: Module '".../JetBrains/WebstormProjects/test5/node_modules/rxjs/Observable"' has no exported member 'Observable'.
...

等等。
如何修复这些错误?

4

1 回答 1

0

请尝试在 Angular 8 中运行以下对我有用的命令。

npm install --save-dev rxjs-compat
于 2019-08-01T10:58:48.377 回答