Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Duplicate RxJS import warning

I just upgraded from RxJS 5 to 6, and updated my code using the migration tool:

rxjs-5-to-6-migrate -p tsconfig.json

At the end of the results, I got a series of messages like this:

WARNING: /path/to/file.ts[3, 1]: duplicate RxJS import

As far as I can tell, this warning appears for every file in my project that imports more than one thing from rxjs (e.g. import {Observable, BehaviorSubject} from "rxjs"). The migration guide has multiple imports as an example, so I would assume that should be fine. A Google search only returned one single result for the warning message, and it doesn't appear to address the same problem (none of the files have any deprecated imports).

What does it mean, and is it anything to worry about?

like image 316
John Montgomery Avatar asked Jun 13 '18 21:06

John Montgomery


1 Answers

Try re-running these commands. It should fix the problem.

npm i -g rxjs-tslint
npm i rxjs-tslint
rxjs-5-to-6-migrate -p src/tsconfig.app.json

Worst case you can add the compatibility package

npm i --save rxjs-compat
like image 107
Anthony DiTomasso Avatar answered Oct 12 '22 12:10

Anthony DiTomasso