
我正在尝试按照here指南从rx5迁移到rx6。最初,我安装了rxjs-compat包,一切正常。但是,当我尝试删除rxjs-compat包时,我得到了一个异常Cannot find module 'rxjs-compat/Subscription'。我使用rxjs-5- to -6-migrate来执行迁移
我使用这个语句来订阅: import { Subscription } from "rxjs";
作为参考,这是我的分支- https://github.com/akshita31/omnisharp-vscode/tree/rxjs_update,这是列出所有更改的相应拉取请求- https://github.com/OmniSharp/omnisharp-vscode/pull/2830
发布于 2019-02-01 08:40:46
我将所有依赖项更新为最新版本,并使用rxjs-tslint-rules,如下所示
规则npm install rxjs-tslint- --save-dev
./node_modules/.bin/tslint -c tslint.json -p tsconfig.json。这将给出所有无效导入的集合,并解决无效导入,然后尝试删除-
npm cache clean --force感谢@cartant的帮助
发布于 2019-01-31 07:46:00
您是否仍有一些仍在使用rxjs-compat的导入
在从rxjs5迁移到rxjs6的过程中,您需要非常小心所有的导入,因为您不希望从错误的路径导入某些模块。我相信rxjs-tslint可以帮助你。
https://stackoverflow.com/questions/54451257
复制相似问题