Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot read property 'visitExpression' of undefined

In my angular app at the startup point I'm facing this error:

Cannot read property visitExpression of undefined

What could be the problem?

like image 845
Ele Avatar asked Oct 08 '16 20:10

Ele


3 Answers

In my case, it was duplicate , in the Routes array in app.routing.ts.

You can use ,[\s]*, as a Regular Expression search query to find it in your routes to find two commas with (0 to many) white spaces in between them.

like image 60
hagay Avatar answered Nov 14 '22 11:11

hagay


It was ',' in my case in app.module.ts file.

imports: [
    BrowserModule,
    **AppRoutingModule,,**
    HttpClientModule,

Changed it to:

imports: [
    BrowserModule,
    **AppRoutingModule,**
    HttpClientModule,
like image 34
Sai S Avatar answered Nov 14 '22 11:11

Sai S


In my case, it was components with empty selectors.

like image 21
Ele Avatar answered Nov 14 '22 11:11

Ele