Reputation: 619
I am trying to migrate from rx5 to rx6 by following the guide here. Initially, I installed along with the rxjs-compat package and everything works fine. However, when I try to remove the rxjs-compat package, I am getting an exception Cannot find module 'rxjs-compat/Subscription'
. I used the rxjs-5-to-6-migrate to perform the migration
I am using this statement for Subscription : import { Subscription } from "rxjs";
For reference this is my branch- https://github.com/akshita31/omnisharp-vscode/tree/rxjs_update and this is the corresponding pull request that lists all the changes - https://github.com/OmniSharp/omnisharp-vscode/pull/2830
Upvotes: 2
Views: 5240
Reputation: 619
I updated all the dependencies to the latest versions and used the rxjs-tslint-rules as follows
"rxjs-no-compat" : true
./node_modules/.bin/tslint -c tslint.json -p tsconfig.json
in the project folder. This will give all the set of invalid imports npm cache clean --force
Thanks @cartant for the help
Upvotes: 1
Reputation: 124
Do you by any chance still have some imports that are still using rxjs-compat
?
With the migration from rxjs 5 to 6, you need to be very careful about all the imports, since you don't want to import some module from wrong the wrong path. I believe rxjs-tslint
can help you.
Upvotes: 0