2

I am updating an old angular 8 project to angular 16. I have updated the project. But now compiling the project is giving me multiple error on components "Cant bind to "something" since it isn't a known property of "something",where "something" here is like some property:for example: Cant bind to "" since it isn't a known property of "div". I am pretty sure that i have done all imports rigth and also everthing is good in the app.module.

Note: There was error while I updated it from angular 8 to angular 15. This error occurs when I updated from angular 15 to 16. Maybe its related to "ngcc" which has been completly removed in angular 16.

I have done and checked all the imports and app.module file. There is nothing wrong there.I guess its most probably related to ngccbeen removed from angular 16.

  • 1
    Angular recommends that you not skip versions when upgrading. So don’t go 8 to 15, instead go 8 to 9 and fix the errors encountered, etc. until complete. – The Head Rush Jul 12 '23 at 10:57
  • 1
    I have already updated like that . from 8 to 9 then 9 to 10 and so on. Untill angular 15 there was no error. But as soon as I updated the project to 16 it's showing the error. – Enter-The-Matrix Jul 13 '23 at 11:11
  • Sounds like your project relies on a `something` that was removed in version 16. Check the changelog for breaking changes. – The Head Rush Jul 13 '23 at 13:11
  • 1
    Yeah its the case. As already mentioned that ngcc has been removed and I doubt that it's causing the issue. And i searched a lot ,but no answer anywhere. – Enter-The-Matrix Jul 14 '23 at 14:16
  • Are the binding and component names really the same? – The Head Rush Jul 14 '23 at 16:36

2 Answers2

1

I am also having same issue after migrating from 15 to 16

user1328004
  • 33
  • 1
  • 5
0

I fixed this error by adding

schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA] in the NgModule class

Fabien Sa
  • 9,135
  • 4
  • 37
  • 44
user1328004
  • 33
  • 1
  • 5