Skip to content
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

ERROR in ./node_modules/rxjs/observable/BoundCallbackObservable.js #185

Open
robport opened this issue Nov 8, 2017 · 3 comments
Open

ERROR in ./node_modules/rxjs/observable/BoundCallbackObservable.js #185

robport opened this issue Nov 8, 2017 · 3 comments

Comments

@robport
Copy link

robport commented Nov 8, 2017

I get this error when building in Angular 5.0 with Angular CLI 1.5 using --prod flag.

The issue is misaligned Observable and Subject import in MeteorObservable.js, ObservableCursor.js, and zone.js and ObservableCollection.js

Change imports to;

import { Observable } from 'rxjs/Observable';
import { Subject } from 'rxjs/Subject';
import { Subscriber } from 'rxjs/Subscriber';

Seen here; angular/angular-cli#7110

@PascalTemel
Copy link

Importing from 'rxjs/Observable' will break webSocket functionality

@robport
Copy link
Author

robport commented Nov 8, 2017

Odd, because it seems to work. How will it break it?

If I don't maek these changes, I cannot do "ng build --prod" because I get "ERROR in ./node_modules/rxjs/observable/BoundCallbackObservable.js..."

@PascalTemel
Copy link

I know about the error and your fix does help, but if you want to use Observable.webSocket, importing from rxjs/Observable does not work. It SHOULD behave the same way as it does when you import from rxjs/Rx, but for some reason it doesn't.

I fixed the issue I had by upgrading to typescript 2.6.1. The production build will work with that typescript version, even if you import from rxjs/Rx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants