Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
355
Trying to add IgcDockmanager to angular 17 project - getting Ivy error
posted

I am following the instructions under Usage on this page

https://es.infragistics.com/products/ignite-ui-angular/angular/components/dock-manager

And I am getting the following error when my app builds

node_modules/@infragistics/igniteui-dockmanager/dist/types/components/dockmanager/dockmanager.public-interfaces.d.ts:460:22
460 export declare class IgcDockManagerComponent extends HTMLElement {
~~~~~~~~~~~~~~~~~~~~~~~
This likely means that the library (@infragistics/igniteui-dockmanager) which declares IgcDockManagerComponent is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

Here are the angular versions in my package.json dependencies section

  "dependencies": {
    "@angular/animations": "~17.2.2",
    "@angular/cdk": "^17.3.3",
    "@angular/common": "~17.2.2",
    "@angular/compiler": "~17.2.2",
    "@angular/core": "~17.2.2",
    "@angular/forms": "~17.2.2",
    "@angular/platform-browser": "~17.2.2",
    "@angular/platform-browser-dynamic": "~17.2.2",
    "@angular/router": "~17.2.2",
    "@infragistics/igniteui-angular": "~17.2.2",
    "@infragistics/igniteui-dockmanager": "^1.14.3"
...
I have another angular application where the Dockmanager bulds and works fine, and here are my versions:
  "dependencies": {
    "@angular/animations": "~17.3.9",
    "@angular/common": "~17.3.9",
    "@angular/compiler": "~17.3.9",
    "@angular/core": "~17.3.9",
    "@angular/forms": "~17.3.9",
    "@angular/platform-browser": "~17.3.9",
    "@angular/platform-browser-dynamic": "~17.3.9",
    "@angular/router": "~17.3.9",
    "@infragistics/igniteui-angular": "~17.2.2",
    "@infragistics/igniteui-dockmanager": "^1.14.3"
...

Thinking that the angular version was the issue, I upgraded my app from 17.2.2 to 17.3.9, but I still get the error.

How do I resolve this issue?

Parents
  • 2700
    Verified Answer
    Offline posted

    Hi Walter,

    Thank you for posting to Infragistics Community!

    I have been looking into your question and what I can say is that there aren't any known issues regarding the compatibility of the mentioned Angular and igniteui-dockmanager versions. The only way I was able to reproduce the same error is in case the “IgcDockManagerComponent” is added to the imports array in the AppModule configuration.:

      imports: [/* … */, IgcDockManagerComponent],

    The dock manager should not be imported like this. Instead, the defineCustomElements method ought to be invoked:

    import { defineCustomElements } from '@infragistics/igniteui-dockmanager/loader';
    
    defineCustomElements();
    
    @NgModule({
      bootstrap: [AppComponent],
     //…
    })
    
     

    Additionally, since the dock manager is a Web Component, a common caveat might be not adding  the CUSTOM_ELEMENTS_SCHEMA to the module configuration:

    import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
    
    @NgModule({
      //..
      schemas: [CUSTOM_ELEMENTS_SCHEMA]
    })

    Please, do check your app for the mentioned configurations and keep me posted on your progress.

    In case the suggestions do not work out for you, please, make sure to provide some additional details about your setup. Ideally, you could try to reproduce the error in an isolated app having the same dependencies and only the dock manager component. Thank you in advance for your cooperation.

    Best regards,
    Bozhidara Pachilova
    Software Developer

Reply Children
No Data