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.

Error generating static site when adding lazy loading routes

See original GitHub issue

Error image

Steps to reproduce

  1. npx @angular/cli new ng-static --routing

  2. ng generate universal --client-project ng-static

  3. Create lazy route image

  4. ng build image

  5. ng run ng-static:server image

  6. npx angular-prerender image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisguttandincommented, Sep 18, 2019

Hi @mbaljeetsingh, I think I was wrong. Thanks to the help of @kroeder and the friendly people in the Angular.de Slack I’m pretty sure now that running a locally installed command only works on OS X. On Windows it either has to be installed globally or it should be used with npx.

I updated the README to reflect that.

Many thanks again for making me aware of this and please let me know if you run into any further issues.

1reaction
chrisguttandincommented, Sep 15, 2019

Hi @mbaljeetsingh, I think I fixed the problem now. Using npx without any arguments like this npx angular-prerender should work again.

Many thanks for making me aware of that bug. Please let me know if you notice any other issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolving errors faced while implementing Lazy Loading with ...
I've been building a travel planning web application at www.awaynation.com with Angular 5. As it is a single-page application, it takes very ...
Read more >
Static routing with React.lazy - Stack Overflow
I am getting the following error message when trying to lazy load static routes when using React.lazy. I am not sure where to...
Read more >
Dynamic Import, Code Splitting, Lazy Loading, and Error ...
Try it. You will encounter the error: “Cannot find module with dynamic import.” This error comes from Webpack, which is used by Create...
Read more >
React Static Web Apps Manage ChunkLoadErrors on ...
After looking at our solution, we can see that we are lazy loading the loader component which manages the promises, errors and retry...
Read more >
A Guide on React Lazy Loading - Refine Dev
Steps we'll cover: What is lazy loading? What is React.lazy; Suspense; Catching Loading Errors; Route-based code-splitting; Component-based ...
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