Reactive-Extensions / RxJS

The Reactive Extensions for JavaScript
http://reactivex.io
Other
19.49k stars 2.1k forks source link

startWith undefined on aot build #1535

Open renannobile opened 6 years ago

renannobile commented 6 years ago

I'm currently facing a misterious problem when building my Angular application.

I use Angular-CLI and run ng build --prod --aot. I then deploy it to Firebase using firebase deploy.

The application starts fine but when it gets to this.searchText.valueChanges.startWith(null), it throws an error because startWith is undefined:

image

Code runs ok on localhost.

If this is not an issue with RxJS I'm sorry. Thanks for your time.

paulpdaniels commented 6 years ago

This is probably an issue for RxJS 5 which is not maintained here.

But you likely need to import the method using the import 'rxjs/add/operator/startWith'