-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Karma fails to resolve rxjs/operators #178
Comments
The file is generated by the angular compiler so not sure how I could effect the way its generated. So do you know what would fix that? And if it works for normal build then shouldn't it be something in the karma setup causing it? |
Change the way you import the operators, e.g.:
Use:
This will cause the operators to be loaded individually. |
The current way is the recommended way according to the rxjs 5.5 pipeable documentation. And our karma unit tests do run properly for components that use this library. So I guess you are using some build system that requires using deep imports, but I am not planning to change to using those since all the imports are again different with the rxjs 6. So I already have next version ready for rxjs 6 and there deep imports are not allowed anymore. |
I understand that, but I don't know other way of fixing it. I've been using that method in all my projects and haven't had an issue yet. And I just find out it's also breaking the Prod/AoT build with SystemJS:
|
Yes its a known rxjs bug that was supposed to be fixed in rxjs 5.5.3. So not sure why you are still experiencing it even you are using 5.5.8. There are many workarounds for the bug though, but those should not be needed anymore. So something is most likely wrong in your setup. Maybe there is some help in the rxjs issue: ReactiveX/rxjs#2971 |
It's not a project setup problem, I'm using this project https://github.com/mgechev/angular-seed as base project which already handles those issues. This appears to be a ngx-perfect-scrollbar issue. |
Ok well hopefully somebody can give more info about this since I don't know what I could do differently since the library is build with angular compiler which does not need any special configuration. The library works in angular-cli, webpack and systemjs example app setup so not sure why it would fail in angular-seed setup. Most likely this issue will be resolved with the move to rxjs 6 anyway. |
You where right about the build, is an angular-seed issue. |
Found it, configuration issue, my bad, closing issue |
What did you do to fix this issue? |
Importing 'rxjs/operators' with require('rxjs/operators') in ngx-prefect-scroolbar.umd.js is causing Karma tests to fail because it will cause it to try to resolve an index.js file that does not exit:
Using Angular 2.5.9, RxJS 5.5.8.
The text was updated successfully, but these errors were encountered: