Invalid configuration of route '': routes must have either a path or a matcher specified : <p>AppRouting.ts</p>

<pre><code>import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core'; 
import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from '../buyer/home/home.component';
const routes: Routes = [
   {path: '', redirectTo:'buyer', pathMatch:"full"}
]
@NgModule({
  declarations:[],
  imports:[
    BrowserModule,
    RouterModule.forRoot(routes)
  ],
   exports:[RouterModule]
})

export class AppRoutingModule {}
</code></pre>

<p>BuyerRouting.ts</p>

<pre><code>import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core'; 
import { Routes,RouterModule } from '@angular/router';

import { WelcomeComponent } from './welcome/welcome.component';
import { HomeComponent } from './home/home.component';

@NgModule({
declarations:[],
imports:[
    CommonModule,
    RouterModule.forChild([
        { path: 'buyer', component: HomeComponent},
        { path: '', redirectTo: '/welcome', pathMatch: 'prefix'},
        { path: 'welcome', component: WelcomeComponent}
    ])
],
exports:[RouterModule]
})

export class BuyerRoutingModule {}
</code></pre>

<p>When I ng serve the app. the build was successfully created but when i run the app I got an error. I have also checked by removing emtpy path still this error is coming.</p>

<pre><code>main.ts:12 Error: Invalid configuration of route '': routes must have either 
a path or a matcher specified
</code></pre>
