In my case, in which I am migrating my angular v10 app to v18, it was that I haven't imported the right component into the imports section of my parent component, as all of them work as standalone now. Such a silly mistake, but again, as appointed for others, this error message doesn't lead you anywhere near from the error.