You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which @angular/* package(s) are relevant/related to the feature request?
No response
Description
What
Non 0 status code should be returned when there is an Error during prerender
Why
When there is an error during pre-rendering, the output in the folder dist/browser is not optimal.
If prerender is run by a continuous integration script, it is likely that the error on the console will go unnoticed.
In my case, prerender is run within a GitHub workflow. Because the exit status code is 0, the workflow continues to the next step and deploys the non-rendered files.
For example:
The following error does not result in a non 0 exit code:
ERROR ReferenceError: window is not defined
Proposed solution
A command line argument could be used to give non 0 status codes on error
Alternatively, all errors give a non 0 status code
Alternatives considered
Using grep, it is possible to filter for lines that contain 'ERROR' in the output.
Something like the following might be a starting point for a workaround
npm run prerender |& grep -c ERROR | grep 0
The text was updated successfully, but these errors were encountered:
Which @angular/* package(s) are relevant/related to the feature request?
No response
Description
What
Non 0 status code should be returned when there is an Error during prerender
Why
When there is an error during pre-rendering, the output in the folder dist/browser is not optimal.
If prerender is run by a continuous integration script, it is likely that the error on the console will go unnoticed.
In my case, prerender is run within a GitHub workflow. Because the exit status code is 0, the workflow continues to the next step and deploys the non-rendered files.
For example:
The following error does not result in a non 0 exit code:
ERROR ReferenceError: window is not defined
Proposed solution
A command line argument could be used to give non 0 status codes on error
Alternatively, all errors give a non 0 status code
Alternatives considered
Using grep, it is possible to filter for lines that contain 'ERROR' in the output.
Something like the following might be a starting point for a workaround
The text was updated successfully, but these errors were encountered: