-
Notifications
You must be signed in to change notification settings - Fork 518
Inaccurate errors returned by compiler #448
Comments
Unfortunately that error comes from Angular, which was bubbled up through Node (during the server rendering process) and then showed up here. What changes did you make for this to happen? My guess is a component is either out in correctly, or maybe you imported something? Any changes from the base would help. But you're right, the message is too vague, I can try to bring it up to some folks to see if there's anyway angular can help more with that one! |
Yep, sorry @piotrek-k, but as @MarkPieszak mentions that's all the information Angular 2 returns in this case. If you want to improve this, could I suggest following up in the Angular issues list? |
@SteveSandersonMS I don't think that is Angular issue. As far as I know Angular returns detailed errors in browser console. When I was following angular.io tutorial, browser was returning proper stack trace with exact position of problem. This have to be something with Node.js server side compiler. |
Do you know what it was exactly that caused it? Some template issue, an incorrect import statement? Let me know so we can try to repro it, and at the very least I can see if it's possible to capture some of the vaguer messages and send something better! Angular has fairly detailed messages, but in this case we are server rendering it, so a myriad of things can go wrong during that parsing and serializing process, some errors which don't come from Core itself, this is why it's so tough ! Any help knowing what line causes it would help though. Thanks Piotrek |
Agreed with @MarkPieszak's comments. @piotrek-k Is this same error definitely reported better when it happens on the client, vs on the server? If so, I'm sure the Angular Universal (component that handles the server-side rendering) folks would want to look at that! |
Is there a quick way to temporarily disable prerendering for my website? To see how it behaves? How can I check those client errors? BTW: error I was talking about magically disappeared after I came back to coding this website, but I would like to know what to do, if I will see something similar in the future ;) |
Just remove the asp-prerender-module tag from your Views/Home/Index.cshtml and that will disable SSR. |
I'm currently building an Angular app using template from your yeoman generator. There is one thing that annoys me and I think it should be fixed.
This is how "Internal Server Errors" are being shown in my project:

Information I've received is highly inaccurate. Message tells me that there is some unexpected token somewhere in my code and in files like
http.umd.js
,main-server.js
or\rxjs\Subscriber.js
which is not true, because problem happens in my code, not in components I import.Is there any way I could improve quality of error messages I receive? I mean: is it possible to include in such error message exact position of faulty code? Or at least name of file where it happens?
Additional info:
Type of generated project: Angular2
Used dependencies:
"Microsoft.AspNetCore.SpaServices": "1.0.0-beta-000019"
The text was updated successfully, but these errors were encountered: