Comments (20)
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
from angular.
Oh my goodness, check, I have found my problem!!!
And I have just change ./ on ./bar/bar.component and the same for header minute ago, i.e. right now I dont use index.ts for layout component and it's really weird for me, ambigious why it happends.
I have just provided you screen file "index.ts" when i was ./ and it didnt work when I linked on index.ts in layout.component
Thanks a lot, I have found with help of you my problem, but it's really strange, because I can link in other components with help of index.ts in another places:)
P.S WebStorm say to me that i can simplify my import like that (screen below), but when I had done that, I catched a problem as well
so I have decided to stay ./bar/bar.component and the same for header, because only this works well
from angular.
@itsnotviktoriaaa I'm very glad that this helped you quickly solve the problem)
from angular.
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 angular
.
If you are wondering why we don't resolve support issues via the issue tracker, please check out this explanation.
from angular.
It's likely that there's an import cycle causing this issue.
from angular.
It's likely that there's an import cycle causing this issue.
No circular dependency found!
from angular.
Did you check that with tools like madge ?
from angular.
@itsnotviktoriaaa, in the case you do not have a circular reference. Kindly provide a minimal reproduction that we can take a look at.
from angular.
Did you check that with tools like madge ?
Yes)
from angular.
@itsnotviktoriaaa, in the case you do not have a circular reference. Kindly provide a minimal reproduction that we can take a look at.
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
also i provide develop branch where i dont use alias and all works well. Of course on develop branch more logic in comparison with alias branch, but, again, problem only start when i am trying to switch my project for using alias. Thank you for help!
app.routes.ts:22 ERROR TypeError: Cannot read properties of undefined (reading 'ɵcmp')
at getComponentDef (core.mjs:2529:12)
at extractDirectiveDef (core.mjs:2418:12)
at core.mjs:2592:21
at Array.map ()
at core.mjs:2592:10
at createTView (core.mjs:11394:63)
at getOrCreateComponentTView (core.mjs:11343:28)
at createRootComponentView (core.mjs:15966:49)
at ComponentFactory.create (core.mjs:15845:39)
at ViewContainerRef2.createComponent (core.mjs:16265:47)
from angular.
Yo tenia el mismo error y tenia un problema de referencia circular.
from angular.
No circular dependency found with help of madge(((
from angular.
In my case this error appears whea i add some directives into standalone component.
like this:
I had already broken all my eyes before I could find in the my app. 2 days of searching, in the end I turned off all modules, stay only the central layout component and got to the bottom of the directives.
17.3, NX, exbuild.
from angular.
@itsnotviktoriaaa Do you have any directives in the project?
from angular.
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...
from angular.
@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.
and now:
from angular.
Right now, I have decided to comment my bar and header comp
and I haven't already catch this error, you can see below screen. Thefore, smth happend with Bar or Header Component, I'm going to investigate further
from angular.
Maybe someone can explain whi it happens? I want to close this issue
from angular.
This is the same issue as with circular deps. Circular imports can break class definitions at run time.
from angular.
But why medge didn't show me that if it's like a circular imports? Or it's not the same?
from angular.
Related Issues (20)
- Link gets broken with space character in its end HOT 1
- solution HOT 1
- Missing documentation for global `ng` variable HOT 1
- Some examples not showing in router API docs page HOT 1
- Cannot run test with ChromeHeadless in Continuous Integration HOT 1
- Missing documentation for InjectionToken HOT 1
- Page Not Found 🙃 - List of pipes HOT 1
- angular.dev NgOptimizedImage docs not up-to-date
- Support VSCode intellisense for `@Attribute` / `HostAttributeToken` usage. HOT 5
- Provide a option to print an error report in the browser if Angular failed to launch due to a JS error HOT 7
- Page not found HOT 1
- ChangeDetection is not triggered after http put when using provideExperimentalZonelessChangeDetection on Angular 18 HOT 8
- ng update does not migrate the asset folder to the new public folder HOT 4
- @else if and signals narrowing HOT 1
- Standalone component with angular element not working with prod build HOT 1
- Combination of redirecting under a primary route and route guarding a sibling route under a named outlet causes NG04013
- ESBuild (build-angular:application) with ng build --base-href not working as expected HOT 2
- `TestBed.overrideProviders` does not override providers of imported standalone directives HOT 3
- App crash when using ngFor with mapped data and a routerLinkActive directive inside the loop. HOT 2
- FetchBackend expects case sensitive 'Content-Type' HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular.