0
votes

I have specified url with some of below pattern.

  • streamz/abc
  • streamz/search/xyz
  • streamz/abc/123

For that I created router like below.

{ path: 'streamz/:name', loadChildren: './streamz-message/streamz-message.module#StreamzMessageModule' },
{ path: 'streamz/search/:id', loadChildren: './streamz-search/streamz-search.module#StreamzSearchModule' },
{ path: 'streamz/:brand/:id', loadChildren: './streamz-detail/streamz-detail.module#StreamzDetailModule' },

This is working fine till yesterday. Once I am installing new node_modules this is not working. This is throwing error as below.

router-error-handling.ts:12 routing error: Error: no elements in sequence at new EmptyError (EmptyError.js:27) at FirstSubscriber.webpackJsonp.../../../../rxjs/operators/first.js.FirstSubscriber._complete (first.js:154) at FirstSubscriber.webpackJsonp.../../../../rxjs/Subscriber.js.Subscriber.complete (Subscriber.js:121) at MergeMapSubscriber.webpackJsonp.../../../../rxjs/operators/mergeMap.js.MergeMapSubscriber._complete (mergeMap.js:144) at MergeMapSubscriber.webpackJsonp.../../../../rxjs/Subscriber.js.Subscriber.complete (Subscriber.js:121) at MapSubscriber.webpackJsonp.../../../../rxjs/Subscriber.js.Subscriber._complete (Subscriber.js:139) at MapSubscriber.webpackJsonp.../../../../rxjs/Subscriber.js.Subscriber.complete (Subscriber.js:121) at EmptyObservable.webpackJsonp.../../../../rxjs/observable/EmptyObservable.js.EmptyObservable._subscribe (EmptyObservable.js:82) at EmptyObservable.webpackJsonp.../../../../rxjs/Observable.js.Observable._trySubscribe (Observable.js:173) at EmptyObservable.webpackJsonp.../../../../rxjs/Observable.js.Observable.subscribe (Observable.js:161) CustomRoutingExtraOptions.errorHandler @ router-error-handling.ts:12 (anonymous) @ router.es5.js:4194 webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:391 onInvoke @ core.es5.js:3890 webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke @ zone.js:390 webpackJsonp.../../../../zone.js/dist/zone.js.Zone.run @ zone.js:141 (anonymous) @ zone.js:831 webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:424 onInvokeTask @ core.es5.js:3881 webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:423 webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask @ zone.js:191 drainMicroTaskQueue @ zone.js:595 webpackJsonp.../../../../zone.js/dist/zone.js.ZoneTask.invokeTask @ zone.js:502 invokeTask @ zone.js:1364 globalZoneAwareCallback @ zone.js:1382

Whats wrong with above routing pattern. Kindly help.

1
Apparently it's a recent 5.5.3 rxjs bug. github.com/ReactiveX/rxjs/issues/3151 ppl been panicking since yesterday - Chau Tran
@ChauTran I was sure this is due to some library upgrade but not aware about specific library. I will try this - Shabbir Dhangot

1 Answers

2
votes

I ran into this error as well. It's caused by the bug in RxJS 5.5.3. I've changed the RxJS dependency to be as follows:

"rxjs": "5.5.2"

This fixed the issue.