I am migrating from angular 5 to angular 7, its when I am getting this error when I do npm start.
const config = this.router.events.pipe(
skipWhile(() => !this.router.navigate),
take(1),
flatMap(() => this.route.queryParams.pipe(take(1)).flatMap(params => {
Other details as below:
private route: ActivatedRouter
private router: Router
rxjs version is ^6.3.3
Replacing flatMap with MergeMap is a good option? If so, do I need to change the code as well? What should I do?

You need to add
flatMapinsidepipeoperator like you did withtake(1)try this: