0
votes

@angular/cli: 1.4.9 node: 6.11.0 os: win32 x64 npm : 3.10.10

the rxjs version in package.json file is "rxjs": "^5.4.2".

The same configuration is working on my collegues machine. without giving this error

import statement is like below :

import { Router } from '@angular/router';

Constructor statement is like below :

constructor( private router: Router) {

Routing statement is like below :

this.router.navigate(['policy']);

I am getting below error while using router in .ts file to navigate from one html5 page to another.

Error coming is like below :

Uncaught (in promise): EmptyError: no elements in sequence EmptyError: no elements in sequence at new EmptyError (EmptyError.js:28) at FirstSubscriber.webpackJsonp.../../../../rxjs/_esm5/operators/first.js.FirstSubscriber._complete (first.js:154) at FirstSubscriber.webpackJsonp.../../../../rxjs/_esm5/Subscriber.js.Subscriber.complete (Subscriber.js:122) at MergeMapSubscriber.webpackJsonp.../../../../rxjs/_esm5/operators/mergeMap.js.MergeMapSubscriber._complete (mergeMap.js:150)

1

1 Answers

0
votes

It's most likely an issue with the current version of rxjs See https://github.com/ReactiveX/rxjs/issues/3151 for details.

// DLDR: Revert your rxjs to max. 5.5.2, that should do the trick