Debug with Angular Universal/prerenderer module #1494

Closed
opened 2025-08-09 17:20:21 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @colltoaction on 7/21/2016

Hi!

I just started a new demo project using the Yeoman template with Angular2.

I have been having some trouble debugging when the prerenderer module is enabled. The main issue here is that we don't get any feedback from the server when there's an issue during prerendering i.e. in the console after running dotnet run.

I've had some moderate success when I made mistakes in my client side code by disabling this in the Home/Index.cshtml file:

<app
     asp-prerender-webpack-config="webpack.config.js">Loading...</app>
@*<app asp-prerender-module="ClientApp/boot-server"
     asp-prerender-webpack-config="webpack.config.js">Loading...</app>*@

But now I'm experiencing a new issue with the same behavior as I had with client side errors (page taking a long time to load followed by an error page), but if I disable prerendering it works fine.

I'm not asking to be helped in solving my particular issue: I'm sure it's a simple mistake I made because I'm new to Angular2. But I do want to know what to do to debug this, and suggest adding more information to the console output about the prerendering process. Maybe just outputting the javascript logs (e.g. console.log, console.error calls) would be enough.

Thanks!

*Originally created by @colltoaction on 7/21/2016* Hi! I just started a new demo project using the Yeoman template with Angular2. I have been having some trouble debugging when the prerenderer module is enabled. The main issue here is that we don't get any feedback from the server when there's an issue during prerendering i.e. in the console after running `dotnet run`. I've had some moderate success when I made mistakes in my client side code by disabling this in the `Home/Index.cshtml` file: ``` cshtml <app asp-prerender-webpack-config="webpack.config.js">Loading...</app> @*<app asp-prerender-module="ClientApp/boot-server" asp-prerender-webpack-config="webpack.config.js">Loading...</app>*@ ``` But now I'm experiencing a new issue with the same behavior as I had with client side errors (page taking a long time to load followed by an error page), but if I disable prerendering it works fine. I'm not asking to be helped in solving my particular issue: I'm sure it's a simple mistake I made because I'm new to Angular2. But I do want to know what to do to debug this, and suggest adding more information to the console output about the prerendering process. Maybe just outputting the javascript logs (e.g. `console.log`, `console.error` calls) would be enough. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1494
No description provided.