-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug(cdk/layout): Circular dependency in DI detected for InjectionToken CSP nonce. #30567
Comments
Is the CDK layout mentioned in any errors? I don't see anything CDK-related in the stack trace. |
The MediaMatcher is getting the csp nonce injected, triggering the error consistently |
I suspect the circular import might be somewhere else, but is showing up at the |
same issue |
I don't think it is a circular reference issue, the app runs fine after refreshing. I didn't have the error until v19 and it happens regardless of which server route type I choose. Figured it would be best here because of the MediaMatcher, maybe it needs to be asked in the main angular repo |
I'm going to attempt to remove all references to cdk/layout and see if it persists beyond that, or if the source of the document call changes |
Nevermind, the update to @angular/cli@19.2.1 came with an update to @angular/ssr. the issue has resolved itself. clear all caches if you do still receive the error, safari didn't clear by itself for me |
Is this a regression?
The previous version in which this bug was not present was
15
Description
This seems a very odd issue.
I have an older app that was building well in v15, which I recently have been attempting to upgrade to v19. This caused it to run into the issue that no routes can be build (even though I have set the serverRoutes to RenderMode.Client).
The error that always pops up on first render when running the app with ng serve is
The text was updated successfully, but these errors were encountered: