Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot read property 'visitExpression' of undefined after copying module

I am currently working on an Angular2 project with custom modules to keep the code clean. Everything was fine until I copied this module into another project.

Ever since I've copied the module into another project, I get the following error: Uncaught TypeError: Cannot read property 'visitExpression' of undefined.

After hours of googling I found out a couple of possible reasons, which I have all tested (and did not work):

  • Double comma's (,,) in the routing
  • Empty selectors in components

Here are some other things I tried:

  • Look up every import in the module and make sure it is correct.
  • Build the typescript files with Gulp (build succeeded without warnings/errors)

I am kind of clue less as to what to try next, any suggestions?

like image 870
Max Avatar asked Oct 30 '22 13:10

Max


1 Answers

Any misplaced commas in Routes array can cause this

const authRoutes: Routes = [,        //<--- This was my issue when I faced it
  {path: 'signup', component:  SignupComponent},
  {path: 'signin', component:  SigninComponent},
]
like image 174
Iancovici Avatar answered Nov 13 '22 01:11

Iancovici