#After migrating Angular from version 15 to 16 throws errors NG8001 - NG8004

46 messages · Page 1 of 1 (latest)

floral sand
#

After migrating Angular from version 15 to 16, user-created components and Material components are throwing the following errors:

error NG8001: 'component-name' is not a known element(both material components and user-created components)

error NG8002: Can't bind to 'ngClass' since it isn't a known property of 'div'.

error NG8002: Can't bind to 'ngModel' since it isn't a known property of 'textarea'.

error NG8002: Can't bind to 'showCustomerFeedback' since it isn't a known property of 'app-session-properties'.

error NG8002: Can't bind to 'dataSource' since it isn't a known property of 'table'.

error NG8003: No directive found with exportAs 'matMenu'.

error NG8004: No pipe found with name 'date'.

I have configured the app.module.ts file as per the documentation, but these issues persist for all Material and user-created components.

Could you please provide a solution for these issues?

sterile raven
#

#questions message

I've replied to you yesterday asking for more information

#

the package.json doesn't help at all, the other screenshots lack information and there's missing context in general

#

Without the additional information, it's very difficult to give you any advice

floral sand
sterile raven
#

then please show the file where the user-actions.component.ts is imported

#

and the user-actions.component.ts file too

floral sand
sterile raven
#

is the MatIcon component also in the declarations of your app module?

sterile raven
#

also, you should just be able to auto import the components form your html file

floral sand
sterile raven
#

is the user actions component only imported in one module?

floral sand
#

No. We are imported few other components

sterile raven
#

i assume your project is checked in to a git repo?

floral sand
#

My project is private repo in GitLab

sterile raven
#

ok, then make sure the state is clean (no changed files) and execute the auto-import on the mat-icon in your html

#

and check what file changed

floral sand
#

How to execute auto-import?

sterile raven
#

for me it's alt+enter

#

but you can also click the light bulb

floral sand
#

I don't have an import option. Please check the attached image

sterile raven
#

what is the error in the app.module.ts?

#

i'm still inclined to say that you have something not imported correctly, but that's impossible to tell without being able to look at the code.
Maybe somebody else has another idea, i'm def out of ideas with the given information

floral sand
floral sand
sterile raven
#

i'm not at the moment, sorry

floral sand
#

Please share your availability

sterile raven
#

for call, not until tuesday evening

floral sand
#

Thanks for your response. We will connect Tuesday evening.

floral sand
#

@sterile raven Shall we connect today evening to fix my issue?

sterile raven
floral sand
#

@sterile raven please share your timezone.

#

My timezone is IST

sterile raven
#

it's a discord timestamp

#

it shows in your timezone

floral sand
#

Please ping me once you can available

sterile raven
floral sand
sterile raven
#

<t:1738173600:f>

#

sorry again

floral sand
#

No problem. We will connect at your mentioned time.

floral sand
#

How to fix this issue?

sterile raven
#

we would need to see the code from the operator-active-sessions component