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
core.mjs:6531 ERROR TypeError: Cannot read properties of undefined (reading 'ɵcmp') #55738
Comments
Hello, we reviewed this issue and determined that it doesn't fall into the bug report or feature request category. This issue tracker is not suitable for support requests, please repost your issue on StackOverflow using tag If you are wondering why we don't resolve support issues via the issue tracker, please check out this explanation. |
It's likely that there's an import cycle causing this issue. |
No circular dependency found! |
Did you check that with tools like madge ? |
@itsnotviktoriaaa, in the case you do not have a circular reference. Kindly provide a minimal reproduction that we can take a look at. |
Yes) |
I can provide you all my project, because it is test project. It's link on archive and on that archive I provide you my branches (alias branch), where I am trying to use alias. Login and signIn works fine (I can see and dont have error in console), but when I sign in with help of google (it's important, go to with help of that to route home), i see only white screen without elements or smth like that and in console i see error. Problem not in google auth, i just said about to order to be on home page you should use button sign in with google. In that link i provide you my app and credentials (problem iwas solved so i deleted this link). Problem is if my component load with help of lazy loading I get error below app.routes.ts:22 ERROR TypeError: Cannot read properties of undefined (reading 'ɵcmp') |
Yo tenia el mismo error y tenia un problema de referencia circular. |
No circular dependency found with help of madge((( |
@itsnotviktoriaaa Do you have any directives in the project? |
Oh, Jesus Christ😧 Thank you for your answer, it’s really interesting decision. I will have checked this as well, if it will be not a decision, just to do the same thing, I mean, to clear all and to start add parts of my code again. And yes, I have some directives, maybe two for forms, but, they are used on Login page and Sign up page, and this pages work well. But, I have noticed on your example, that your directive has @HostListener, I have the same on Header Component (and it’s one of components, which exist in my layout, when I get this error). Somehow, I have to check in my code. Of course, I will have commented after my checking in here:) Thank again for your decision |
Well, this is not a solution yet, but it is a way to find a problem in a large project that has helped out many times... |
@itsnotviktoriaaa I think that in my case this happens because inside the library the IDE substitutes imports as from an external library (shortned link), perhaps it’s the same for you. Chech your index.tx file if exist. |
@itsnotviktoriaaa I'm very glad that this helped you quickly solve the problem) |
Maybe someone can explain whi it happens? I want to close this issue |
This is the same issue as with circular deps. Circular imports can break class definitions at run time. |
But why medge didn't show me that if it's like a circular imports? Or it's not the same? |
Which @angular/* package(s) are the source of the bug?
router
Is this a regression?
No
Description
When using Angular 17, everything worked ok without aliases, but when I added the path to tsconfig and changed the paths everywhere, I encountered an error in the console
I would be grateful for your help!
Please provide a link to a minimal reproduction of the bug
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
The text was updated successfully, but these errors were encountered: