Angular 12 Ivy full compilation mode : ‘XYZ component’ is not a known element

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #676723 Reply


    I upgraded my Angular project to version 12. It uses Ivy to build my entire project. The project contains 1 library which contains components, services and model classes. All components are declared and exported in the library module.ts file. They are also in the public_api.ts file. I have several projects that use that library and its components. At runtime there are no errors. All components, services etc. are found.

    However in MyEclipse, when I open a project component that uses that uses a library component I get the error:

    ‘bar-common-fy22-proposal-requirements-panel’ is not a known element:
    1. If ‘bar-common-fy22-proposal-requirements-panel’ is an Angular component, then verify that it is part of this module.
    2. If ‘bar-common-fy22-proposal-requirements-panel’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message.

    This was all working fine using the Codemix plugin and Angular 10 using the old View Engine compiler.

    Is there a solution to this problem in MyEclipse?

    #676743 Reply



    Sorry that you are seeing this issue.
    Can you please recheck if any of the installed libraries version are incompatible with Angular 12?
    Try deleting the node_modules folder and then run npm install again to check if it helps fix the issue.

    Genuitec Support

    #676805 Reply


    Hi Swapna:

    I upgraded my project to Angular 12 and I am successfully running it. There are no errors.

    However when I open the project files using MyEclipse I get the aforementioned error when I open a component HTML file which references a component from the bar-common library. Angular 12 uses the Ivy compiler which does not generate the lib-name.metadata.json file. I even changed my bar-common library to use “strictTemplates”: true at compile time. That seemed todo the trick in Visual Code Studio and IntelliJ. Both of those IDEs have no problem finding my ‘bar-common-fy22-proposal-requirements-panel’ component.


    #676806 Reply


    My Angular project is setup as a multi project workspace:

    bar-common (library shared across my applications)

    I start out with a clean workspace inside of angular-test. I removed node_modules, dist and package-lock.json. Then I do:
    npm install
    ng build –project=bar-common
    npm install

    All applications are running just fine. The error only happens when I open an HTML file referencing a bar-common component in MyEclipse.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Angular 12 Ivy full compilation mode : ‘XYZ component’ is not a known element

You must be logged in to post in the forum log in