Closed Pu4 closed 6 years ago
rxjs-compat is required if you do any import like rxjs/something ex :
import { Subject } from "rxjs/Subject"
.
A way to find out if anything you import is done "the old way" is by checking the file of the module your are importing.
For example in node_modules/rxjs/Subject.js you will find it wants rxjs-compat. But
import { Subject } from "rxjs"
has its origin in the new structure. I had same problems because I had import "rxjs/add/operator/...";
in some places, so thats also another reason.
It almost sounds like somewhere in your own code, you're importing from 'rxjs/Rx'
. If that's the case, simply find where that import is, and replace it with an import from the new improved index (e.g. import {Observable} from 'rxjs';
).
The thing is, you've already been over your code with the linter. So it sounds more like you have a dependency on a library that is importing from 'rxjs/Rx'
. If the import isn't in your code, it's in your node_modules. If that's the case, you'll need to re-introduce rxjs-compat
for now, and petition the author of the library to update to RxJS 6.
@DaemonExMachina, thank you.
I found single rxjs/Rx
import in one of the files and removed it. That solved my issue.
Hi. I'm trying to upgrade my angular app to fresh version using steps from this article https://www.ngdevelop.tech/upgrade-angular-5-to-6/ Everything worked fine, after running
rxjs-5-to-6-migrate
command linter found and fixed some issues, ng serve worked as well. But after I removed rxjs-compat I got one errorERROR in node_modules/rxjs/Rx.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat'.
This is the only error in console, Rx.d.ts file contains single line of code
export * from 'rxjs-compat';
Removing and reinstalling all packages from node_modules also didn't worked. Am I doing something wrong?
Additional information: package.json