Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Cannot find name 'ResizeObserver' error after upgrading to Clarity 5.4.0 #6060

Closed
wendellestradairely opened this issue Jun 12, 2021 · 21 comments
Labels
status: needs reproduction type: build Includes issues that pertain to webpack, docker, travis, gemini, and the kitchen sink app type: support Support, implementation or questions

Comments

@wendellestradairely
Copy link

wendellestradairely commented Jun 12, 2021

Got some errors after upgrading from Clarity 5.3.0 to Clarity 5.4.0

snippet from package.json

{
   "@angular/animations": "12.0.3",
    "@angular/common": "^12.0.3",
    "@angular/compiler": "~12.0.3",
    "@angular/core": "~12.0.3",
    "@angular/forms": "~12.0.3",
    "@angular/localize": "~12.0.3",
    "@angular/platform-browser": "~12.0.3",
    "@angular/platform-browser-dynamic": "~12.0.3",
    "@angular/router": "~12.0.3",
    "@aspnet/signalr": "^1.1.4",
    "@cds/angular": "^5.4.0",
    "@cds/city": "^1.1.0",
    "@cds/core": "^5.4.0",
    "@clr/angular": "^5.4.0",
    "@clr/core": "^4.0.15",
    "@clr/icons": "^5.4.0",
    "@clr/ui": "^5.4.0"
}

Error logs:

Error: node_modules/@cds/core/forms/control-group/control-group.element.d.ts:65:46 - error TS2304: Cannot find name 'ResizeObserver'.

65     protected observers: (MutationObserver | ResizeObserver)[];
                                                ~~~~~~~~~~~~~~


Error: node_modules/@cds/core/forms/control/control.element.d.ts:79:46 - error TS2304: Cannot find name 'ResizeObserver'.

79     protected observers: (MutationObserver | ResizeObserver)[];
                                                ~~~~~~~~~~~~~~


Error: node_modules/@cds/core/forms/form-group/form-group.element.d.ts:52:46 - error TS2304: Cannot find name 'ResizeObserver'.

52     protected observers: (MutationObserver | ResizeObserver)[];
                                                ~~~~~~~~~~~~~~


Error: node_modules/@cds/core/internal/utils/responsive.d.ts:11:86 - error TS2304: Cannot find name 'ResizeObserver'.

11 export declare function elementResize(element: HTMLElement, callbackFn: () => void): ResizeObserver;
                                                                                        ~~~~~~~~~~~~~~  
0m

Error: node_modules/@cds/core/internal/utils/responsive.d.ts:18:124 - error TS2304: Cannot find name 'ResizeObserver'.

18 export declare function updateComponentLayout(component: ResponsiveComponent, layoutConfig: LayoutConfig, fn: () => void): ResizeObserver;

Then in my other project, I'm having errors regarding "lit-html":

✖ Compiling TypeScript sources through NGC
ERROR: node_modules/@cds/core/internal/base/button.base.d.ts:16:25 - error TS2315: Type 'TemplateResult' is not generic.

16     protected render(): import("lit-html").TemplateResult<1>;
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@cds/core/internal/base/focus-trap.base.d.ts:19:25 - error TS2315: Type 'TemplateResult' is not generic.

19     protected render(): import("lit-html").TemplateResult<1>;
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@cds/core/icon/icon.element.d.ts:94:25 - error TS2315: Type 'TemplateResult' is not 
generic.

94     protected render(): import("lit-html").TemplateResult<1> | import("lit-html").TemplateResult<2>;
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@cds/core/icon/icon.element.d.ts:94:64 - error TS2315: Type 'TemplateResult' is not 
generic.

94     protected render(): import("lit-html").TemplateResult<1> | import("lit-html").TemplateResult<2>;
                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@cds/core/accordion/accordion.element.d.ts:33:15 - error TS2315: Type 'TemplateResult' is not generic.

33     render(): import("lit-html").TemplateResult<1>;
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@cds/core/accordion/accordion-panel.element.d.ts:42:15 - error TS2315: Type 'TemplateResult' is not generic.

42     render(): import("lit-html").TemplateResult<1>;
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/@cds/core/accordion/accordion-content.element.d.ts:34:15 - error TS2315: Type 'TemplateResult' is not generic.

34     render(): import("lit-html").TemplateResult<1>;
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Clarity: 5.4.0
Angular: 12.0.3
Typescript: "~4.2.4"
Nodejs: v12.20.2
OS: Windows 10 Enterprise

@omar-zahid
Copy link

omar-zahid commented Jun 13, 2021

Following workaround works for me:
npm install -D @types/resize-observer-browser
Then, add the following line to your tsconfig.app.json under compilerOptions
"types": ["resize-observer-browser"]

@ponna93
Copy link

ponna93 commented Jun 14, 2021

Hi, I'm also facing the same errors
image

Clarity: 5.4.0
Angular: 12.0.3
Typescript: "~4.2.4"
Nodejs: v12.20.2
OS: Windows 10 Enterprise

@coryrylan
Copy link
Contributor

coryrylan commented Jun 14, 2021

What @omar-zahid posted is correct the resize observer issue is due to a change in the TypeScript compiler adding support for the ResizeObserver type. This can come up if the version of TS compiling the project is older and missing the ResizeObserver type definition. The options are to update the typescript package or install the resize observer type.

  1. npm install -D @types/resize-observer-browser

  2. // tsconfig.app.json compilerOptions
    "types": ["resize-observer-browser"]
    

We are still investigating the lit-html error. If there is any listing of lit-html or lit-element in your package.json dependencies try to remove it and reinstall dependencies. There may be a conflict or out of date type that TS is picking up.

@mathisscott
Copy link
Contributor

And to follow on that...

If you get through that and still no luck, could you please push up a branch that we can access that demonstrates the issue? I've built out just under a half-dozen apps using various approaches trying to replicate it. It would help to have something to work on that fails in the exact way that you are seeing to help diagnose what might fix it.

@mathisscott mathisscott added status: needs reproduction type: build Includes issues that pertain to webpack, docker, travis, gemini, and the kitchen sink app type: support Support, implementation or questions labels Jun 14, 2021
@gnomeontherun
Copy link
Contributor

gnomeontherun commented Jun 14, 2021

If you have @clr/core installed with your Clarity v5 installation, remove it. That might also be the source of your issues. It is possible that older installs might have @clr/core installed from previous versions, but it should be removed in favor of @cds/core.

@wendellestradairely
Copy link
Author

@gnomeontherun @mathisscott Uninstalling the @clr/core solves the issue of lit-html or lit-element. As for the ResizeObserver, it appears that I was using Angular 11 and a lower version (4.0.7) of typescript in my other project. Upgrading to the Angular 12 and Typescript 4.2.4 solves the issue.

@mathisscott
Copy link
Contributor

That's great, @wendellestradairely

In addition, @gnomeontherun has a PR ready to merge in that will hopefully smooth over any other 5.4 issues.

@ghost
Copy link

ghost commented Jun 18, 2021

@coryrylan @mathisscott I tried by installing the resize observer type. And added the "types": ["resize-observer-browser"] in tsconfig.app.json file as well.
Still the issue
Error: node_modules/@cds/core/internal/utils/responsive.d.ts:18:124 - error TS2304: Cannot find name 'ResizeObserver'.

remains same. I am not looking to update the typescript right now, because I will have to update angular as well and then followed by hell lot of changes.

Is there any other alternative ?

@ghost
Copy link

ghost commented Jun 21, 2021

This worked
The @cds/core version was 5.0.1 and angular version was 11.2.10.
Updating @cds/core to 5.1.1 worked.

@AngelRani
Copy link

hi i have updated angular clarity and cds/core.
but got this error


Error: node_modules/@cds/core/icon/icon.element.d.ts:94:25 - error TS2315: Type 'TemplateResult' is not generic.

94     protected render(): import("lit-html").TemplateResult<1> | import("lit-html").TemplateResult<2>;
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/@cds/core/icon/icon.element.d.ts:94:64 - error TS2315: Type 'TemplateResult' is not generic.

94     protected render(): import("lit-html").TemplateResult<1> | import("lit-html").TemplateResult<2>;
                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/@cds/core/internal/base/button.base.d.ts:16:25 - error TS2315: Type 'TemplateResult' is not generic.

16     protected render(): import("lit-html").TemplateResult<1>;
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/@cds/core/internal/base/focus-trap.base.d.ts:19:25 - error TS2315: Type 'TemplateResult' is not generic.

19     protected render(): import("lit-html").TemplateResult<1>;
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/wiz-lib/lib/wiz-lib.module.d.ts:6:21 - error TS2694: Namespace '"/usr/local/var/www/WMC2-Frontend/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDefWithMeta'.

6     static ɵmod: i0.ɵɵNgModuleDefWithMeta<WizLibModule, [typeof i1.WizVehicleMapComponent], [typeof i2.CommonModule, typeof i3.LeafletModule], [typeof i1.WizVehicleMapComponent]>;
                      ~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/wiz-lib/lib/wiz-vehicle-map.component.d.ts:132:21 - error TS2694: Namespace '"/usr/local/var/www/WMC2-Frontend/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDef'.

132     static ɵfac: i0.ɵɵFactoryDef<WizVehicleMapComponent, never>;
                        ~~~~~~~~~~~~


Error: node_modules/wiz-lib/lib/wiz-vehicle-map.component.d.ts:133:21 - error TS2694: Namespace '"/usr/local/var/www/WMC2-Frontend/node_modules/@angular/core/core"' has no exported member 'ɵɵComponentDefWithMeta'.

133     static ɵcmp: i0.ɵɵComponentDefWithMeta<WizVehicleMapComponent, "wiz-vehicle-map", never, { "entities": "entities"; "customerName": "customerName"; "printLocationOnClick": "printLocationOnClick"; "zoomDelta": "zoomDelta"; "markerPosition": "markerPosition"; "dynamicMarkerPosition": "dynamicMarkerPosition"; "deferredRenderingTime": "deferredRenderingTime"; "zoomEnabled": "zoomEnabled"; "dragEnabled": "dragEnabled"; "youAreHere": "youAreHere"; "youAreHereScaleDelta": "youAreHereScaleDelta"; "offset": "offset"; }, { "polygonClick": "polygonClick"; "newMarkerPosition": "newMarkerPosition"; }, never, never>;
                        ~~~~~~~~~~~~~~~~~~~~~~


Error: src/app/eav/eav-explain-tokens-modal/eav-explain-tokens-modal.component.ts:118:20 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

118       this.clrForm.markAsDirty();
                       ~~~~~~~~~~~


Error: src/app/eav/eav-master-selection-modal/eav-master-selection-modal.component.ts:79:18 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

79     this.clrForm.markAsDirty();
                    ~~~~~~~~~~~


Error: src/app/modules/catalogues/catalogues-modal/catalogues-modal.component.ts:122:12 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

122       form.markAsDirty();
               ~~~~~~~~~~~


Error: src/app/modules/companies/companies-wizard-address-page/companies-wizard-address-page.component.ts:88:18 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

88     this.clrForm.markAsDirty();
                    ~~~~~~~~~~~


Error: src/app/modules/companies/companies-wizard-general-data-page/companies-wizard-general-data-page.component.ts:118:18 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

118     this.clrForm.markAsDirty();
                     ~~~~~~~~~~~


Error: src/app/modules/departments/departments-modal/departments-modal.component.ts:144:20 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

144       this.clrForm.markAsDirty();
                       ~~~~~~~~~~~


Error: src/app/modules/interactive/interactive-new-setup-modal/interactive-new-setup-modal.component.ts:59:18 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

59     this.clrForm.markAsDirty();
                    ~~~~~~~~~~~


Error: src/app/modules/interactive/interactive-settings/interactive-settings-cta/interactive-settings-cta.component.ts:96:20 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

96       this.clrForm.markAsDirty();
  [0[39mm                    ~~~~~~~~~~~


Error: src/app/modules/interactive/interactive-settings/interactive-settings-layout/interactive-settings-layout.component.ts:125:20 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

125       this.clrForm.markAsDirty();
                       ~~~~~~~~~~~


Error: src/app/modules/interactive/interactive-settings/interactive-settings-slideshow/interactive-settings-slideshow.component.ts:116:20 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

116       this.clrForm.markAsDirty();
                       ~~~~~~~~~~~


Error: src/app/modules/interactive/interactive-settings/interactive-settings-templates/interactive-settings-templates.component.ts:124:20 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

124       this.clrForm.markAsDirty();
                       ~~~~~~~~~~~


Error: src/app/modules/interactive/interactive-settings/interactive-settings-timeout/interactive-settings-timeout.component.ts:96:20 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

96       this.clrForm.markAsDirty();
                      ~~~~~~~~~~~


Error: src/app/modules/interactive/interactive-tiles/interactive-new-tile-modal/interactive-contact-form-form/interactive-contact-form-form.component.ts:109:18 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

109     this.clrForm.markAsDirty();
                     ~~~~~~~~~~~


Error: src/app/modules/interactive/interactive-tiles/interactive-new-tile-modal/interactive-employees-form/interactive-employees-form.component.ts:109:18 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

109     this.clrForm.markAsDirty();
                     ~~~~~~~~~~~


Error: src/app/modules/interactive/interactive-tiles/interactive-new-tile-modal/interactive-webview-form/interactive-webview-form.component.ts:64:20 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

64       this.clrForm.markAsDirty();
                      ~~~~~~~~~~~


Error: src/app/modules/languages/languages-modal/languages-modal.component.ts:100:20 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

100       this.clrForm.markAsDirty();
                       ~~~~~~~~~~~


Error: src/app/modules/rooms/rooms-wizard-details-page/rooms-wizard-details-page.component.ts:130:18 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

130     this.clrForm.markAsDirty();
                     ~~~~~~~~~~~


Error: src/app/modules/rooms/rooms-wizard-general-data-page/rooms-wizard-general-data-page.component.ts:91:18 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

91     this.clrForm.markAsDirty();
                    ~~~~~~~~~~~


Error: src/app/onscreen/presentations/presentations-wizard-general-data-page/presentations-wizard-general-data-page.component.ts:106:18 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

106     this.clrForm.markAsDirty();
                     ~~~~~~~~~~~


Error: src/app/onscreen/ticker/ticker-wizard-general-data-page/ticker-wizard-general-data-page.component.ts:83:18 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

83     this.clrForm.markAsDirty();
                    ~~~~~~~~~~~


Error: src/app/system/slaves/register-slave-modal/register-slave-modal.component.ts:102:18 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

102     this.clrForm.markAsDirty();
                     ~~~~~~~~~~~


Error: src/app/system/station-groups/station-groups-form/station-groups-form.component.ts:178:18 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

178     this.clrForm.markAsDirty();
                     ~~~~~~~~~~~


Error: src/app/system/stations/station-detail-form/station-detail-form.component.ts:272:20 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

272       this.clrForm.markAsDirty();
                       ~~~~~~~~~~~


Error: src/app/system/timemachine/timemachine-wizard/timemachine-wizard-general-data-page/timemachine-wizard-general-data-page.component.ts:91:20 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

91       this.clrForm.markAsDirty();
                      ~~~~~~~~~~~


Error: src/app/system/timemachine/timemachine-wizard/timemachine-wizard-schedule-page/timemachine-wizard-schedule-page.component.ts:157:20 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

157       this.clrForm.markAsDirty();
                       ~~~~~~~~~~~


Error: src/app/system/timemachine/timemachine-wizard/timemachine-wizard-schedule-page/timemachine-wizard-schedule-page.component.ts:191:20 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

191       this.clrForm.markAsDirty();
                       ~~~~~~~~~~~


Error: src/app/system/users/user-modal/user-modal.component.ts:226:20 - error TS2339: Property 'markAsDirty' does not exist on type 'ClrForm'.

226       this.clrForm.markAsDirty();
                       ~~~~~~~~~~~


Error: src/app/template-editor/wizai-grid-element/wizai-grid-element.component.ts:30:63 - error TS2729: Property 'gridElement' is used before its initialization.

30   @HostBinding('class.wizai-grid-columns') hasColumns = (this.gridElement) ? this.gridElement.hasColumns : false;
                                                                 ~~~~~~~~~~~

  src/app/template-editor/wizai-grid-element/wizai-grid-element.component.ts:20:12
    20   @Input() gridElement: any;
                  ~~~~~~~~~~~
    'gridElement' is declared here.


Error: src/app/template-editor/wizai-grid-element/wizai-grid-element.component.ts:30:83 - error TS2729: Property 'gridElement' is used before its initialization.

30   @HostBinding('class.wizai-grid-columns') hasColumns = (this.gridElement) ? this.gridElement.hasColumns : false;
                                                                                     ~~~~~~~~~~~

  src/app/template-editor/wizai-grid-element/wizai-grid-element.component.ts:20:12
    20   @Input() gridElement: any;
                  ~~~~~~~~~~~
    'gridElement' is declared here.


Error: src/app/template-editor/wizai-grid-element/wizai-grid-element.component.ts:31:57 - error TS2729: Property 'gridElement' is used before its initialization.

31   @HostBinding('class.wizai-grid-rows') hasRows = (this.gridElement) ? this.gridElement.hasRows : false;
                                                           ~~~~~~~~~~~

  src/app/template-editor/wizai-grid-element/wizai-grid-element.component.ts:20:12
    20   @Input() gridElement: any;
                  ~~~~~~~~~~~
    'gridElement' is declared here.


Error: src/app/template-editor/wizai-grid-element/wizai-grid-element.component.ts:31:77 - error TS2729: Property 'gridElement' is used before its initialization.

31   @HostBinding('class.wizai-grid-rows') hasRows = (this.gridElement) ? this.gridElement.hasRows : false;
                                                                               ~~~~~~~~~~~

  src/app/template-editor/wizai-grid-element/wizai-grid-element.component.ts:20:12
    20   @Input() gridElement: any;
                  ~~~~~~~~~~~
    'gridElement' is declared here.


Error: src/app/template-editor/wizai-grid-element/wizai-grid-element.component.ts:32:56 - error TS2729: Property 'gridElement' is used before its initialization.

32   @HostBinding('class.wizai-grid-leaf') isLeaf = (this.gridElement) ? this.gridElement.isLeaf : false;
                                                          ~~~~~~~~~~~

  src/app/template-editor/wizai-grid-element/wizai-grid-element.component.ts:20:12
    20   @Input() gridElement: any;
                  ~~~~~~~~~~~
    'gridElement' is declared here.


Error: src/app/template-editor/wizai-grid-element/wizai-grid-element.component.ts:32:76 - error TS2729: Property 'gridElement' is used before its initialization.

32   @HostBinding('class.wizai-grid-leaf') isLeaf = (this.gridElement) ? this.gridElement.isLeaf : false;
                                                                              ~~~~~~~~~~~

  src/app/template-editor/wizai-grid-element/wizai-grid-element.component.ts:20:12
    20   @Input() gridElement: any;
                  ~~~~~~~~~~~
    'gridElement' is declared here.



@AngelRani
Copy link

why came this error after update ?

@ghost
Copy link

ghost commented Jul 9, 2021

Hi @AngelRani
You need to check if those methods are still supported in updated package, if not then what's the alternative. And what's the version you have updated your package to ?

@siddharth1903
Copy link

@coryrylan @mathisscott I tried by installing the resize observer type. And added the "types": ["resize-observer-browser"] in tsconfig.app.json file as well.
Still the issue
Error: node_modules/@cds/core/internal/utils/responsive.d.ts:18:124 - error TS2304: Cannot find name 'ResizeObserver'.

remains same. I am not looking to update the typescript right now, because I will have to update angular as well and then followed by hell lot of changes.

Is there any other alternative ?

@786lokesh which phase of app compilation are you facing this issue... In my case, i had to add it tsconfig.json and remove

"types": [], from tsconfig.lib.json since it impacted my library compilation(using ng packagr) and each library config extends from tsconfig rather than tsconfig.app... Let me know if this could work for you!

@siddharth1903
Copy link

@mathisscott is there a tentative timeline for this issue that we can look forward to?

@mathisscott
Copy link
Contributor

@siddharth1903
This isn't an issue with Clarity. It's an issue with expected versions of Typescript not being aligned. Similar to how you've said you're not looking to upgrade typescript because then you'd have to upgrade angular.

If you are not going to upgrade typescript, then the fix/workaround for this issue is as you describe: add the resize-observer type to where it needs to be (and that may vary depending on if you are building an app or library).

@ghost
Copy link

ghost commented Jul 12, 2021

@coryrylan @mathisscott I tried by installing the resize observer type. And added the "types": ["resize-observer-browser"] in tsconfig.app.json file as well.
Still the issue
Error: node_modules/@cds/core/internal/utils/responsive.d.ts:18:124 - error TS2304: Cannot find name 'ResizeObserver'.
remains same. I am not looking to update the typescript right now, because I will have to update angular as well and then followed by hell lot of changes.
Is there any other alternative ?

@786lokesh which phase of app compilation are you facing this issue... In my case, i had to add it tsconfig.json and remove

"types": [], from tsconfig.lib.json since it impacted my library compilation(using ng packagr) and each library config extends from tsconfig rather than tsconfig.app... Let me know if this could work for you!

@siddharth1903 I already shared what worked for me

@siddharth1903
Copy link

@mathisscott thanks much... Bumping up the version of typescript(4.1.x from 4.0.x) alone fixes this problem.. Have removed the work around as you have suggested! A bit weird to me why the angular upgrade schematic doesn't automatically bump up typescript too!

@kumar-tadepalli
Copy link

If you have @clr/core installed with your Clarity v5 installation, remove it. That might also be the source of your issues. It is possible that older installs might have @clr/core installed from previous versions, but it should be removed in favor of @cds/core.

Can't we use core and angular components in same project? I mean mixing is not recommended?

@mathisscott
Copy link
Contributor

If you have @clr/core installed with your Clarity v5 installation, remove it. That might also be the source of your issues. It is possible that older installs might have @clr/core installed from previous versions, but it should be removed in favor of @cds/core.

Can't we use core and angular components in same project? I mean mixing is not recommended?

@clr/core is the Core component library in versions 3 and 4. @cds/core is version 5+

Loading @clr/core and @cds/core into the same project has nothing to do with angular vs. core components. It's loading two different versions of the same library into one project. Like trying to build an app that uses both Angular v9 and v12 at the same time...

@lbpeter
Copy link

lbpeter commented Jul 22, 2021

@gnomeontherun @mathisscott Uninstalling the @clr/core solves the issue of lit-html or lit-element. As for the ResizeObserver, it appears that I was using Angular 11 and a lower version (4.0.7) of typescript in my other project. Upgrading to the Angular 12 and Typescript 4.2.4 solves the issue.

Thanks,it is works for me.

@github-actions
Copy link

github-actions bot commented Aug 6, 2021

Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: needs reproduction type: build Includes issues that pertain to webpack, docker, travis, gemini, and the kitchen sink app type: support Support, implementation or questions
Projects
None yet
Development

No branches or pull requests

10 participants