question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

If app-routing isn't in same dir as app.module, guess errors on it's lazily loaded routes.

See original GitHub issue

If my project looks like this:

- app.module.ts
- routing
    |- app-routing.module.ts

And in the app-routing I have routes that are lazily loaded, when I do the traverseForRoutes stuff… it errors on the lazily loaded modules in the app-routing. If I move the file back to the same dir as the app.module… the error goes away.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
sukecommented, Jan 23, 2021

Hi, I created a demo app that reproduces this problem. It also includes a script to run guess-parser node ./scripts/routes.js.

2reactions
mgechevcommented, Jan 23, 2021

Thank you @suke, I’ll make some time for this issue in the next a couple of days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular2 lazy loading module error 'cannot find module'
I met a similar issue when working with Angular 4.4.5 and webpack and ... The "parent" module (app-routing.module.ts), would have a route ......
Read more >
Customize Angular lazy loading modules for multiple frontends
Learn how to maximize your code sharing and cleanly separate your different UI components and services for multiple frontend Angular apps.
Read more >
Lazy-loading feature modules - Angular
If ng generate module with the --route parameter returns an error, but runs correctly without it, you might have imported the same module...
Read more >
Manually Lazy Load Modules And Components In Angular
A lazy-loaded module can be defined in the routing configuration using the ... lazy loading of a module using the Angular router as...
Read more >
angular routes not working in production - You.com
Here are the routes of my app.routing.module ... No errors, warnings, or whatsoever. ... Both libraries expose the same lazy loaded routes (A...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found