我正在尝试从rxjs导入Subject和fromEvent,如下所示。
import { Subject } from "rxjs";
import { fromEvent, Subject } from 'rxjs';我在标题中指定的错误显示在控制台中。
这是我的package.json依赖项:
"dependencies": {
"@types/node": "^10.12.18",
"@types/powerapps-component-framework": "^1.2.0",
"bootstrap": "^5.0.1",
"jquery": "^3.6.0",
"popper.js": "^1.16.1",
"rxjs": "^7.1.0"
},发布于 2021-09-24 21:16:39
您的TypeScript版本可能已过期。breaking changes for RxJS 7表示:
TS: RxJS需要TS 4.2
使用过时的版本将产生该错误。将TS版本更新到最新版本也可以解决这个问题。
发布于 2021-06-09 22:29:11
我将我的rxjs版本从7更改为6.5.4,并修复了它
https://stackoverflow.com/questions/67905170
复制相似问题