-
Notifications
You must be signed in to change notification settings - Fork 762
Cannot find name 'ResizeObserver' error after upgrading to Clarity 5.4.0 #6060
Comments
Following workaround works for me: |
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
We are still investigating the |
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. |
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 |
@gnomeontherun @mathisscott Uninstalling the |
That's great, @wendellestradairely In addition, @gnomeontherun has a PR ready to merge in that will hopefully smooth over any other 5.4 issues. |
@coryrylan @mathisscott I tried by installing the resize observer type. And added the "types": ["resize-observer-browser"] in tsconfig.app.json file as well. 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 ? |
This worked |
hi i have updated angular clarity and cds/core.
|
why came this error after update ? |
Hi @AngelRani |
@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! |
@mathisscott is there a tentative timeline for this issue that we can look forward to? |
@siddharth1903 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). |
@siddharth1903 I already shared what worked for me |
@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! |
Can't we use core and angular components in same project? I mean mixing is not recommended? |
Loading |
Thanks,it is works for me. |
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. |
Got some errors after upgrading from Clarity 5.3.0 to Clarity 5.4.0
snippet from package.json
Error logs:
Then in my other project, I'm having errors regarding "lit-html":
Clarity: 5.4.0
Angular: 12.0.3
Typescript: "~4.2.4"
Nodejs: v12.20.2
OS: Windows 10 Enterprise
The text was updated successfully, but these errors were encountered: