vmware-archive/clarity

Cannot build Angular 12 application

matthewtquinn1 opened this issue · 5 comments

Describe the bug

After upgrading angular to version 12, and updating both Clarity and Clarity Addons to their latest versions, I am unable to build my angular application. I receive a warning about deep imports, and the build later fails when looking for module lit-html.

Warning:
image

Error:
image

Steps to reproduce the behavior:

  1. Setup Angular 12 application
  2. Install latest versions of Clarity and Clarity Addons
  3. ng build --configuration production
  4. See error

Expected behavior

I should be able to build the application using ng build --configuration production without getting this warning or errors.

Versions

Clarity project:

  • [5.6.2] cds/core
  • [12.0.9] clr/angular
  • [12.0.9] clr/icons
  • [12.0.9] clr/ui
  • [2.6.0] webcomponents/webcomponents.js

Framework:

  • Angular

Framework version:
Angular 12.2.15

Device:

  • Type: [Laptop]
  • OS: [windows]

Additional notes

Here is what the angular.json file looks like:
image

Hi @matthewtquinn1,

Could you please provide us a stackblitz example? I remember that we changed the usage of lit-html because lit team did a little change on their packages and now html is part of the lit package. so it might be a little older version you are using of @cds/core that causes the issue but can't be sure about it.

Per version @cds/core@5.4.0 we upgraded to Lit v2. We no longer need lit-html as a result of that update. So it's odd that lit-html is showing up here. Perhaps it's an old node_module somewhere? Or maybe there's a custom component in your project that uses lit-html?

Could you also try running window.CDS.getDetails() in the console of your application to list the details here. This will help give us an idea of what versions of Core are running in the page.

Hi everyone, thank you for the replies.

We were on node version 14.16. One of our developers tried the upgrade himself, who was on 14.17, and that allowed the update to work.

Therefore I'll close this issue and thank you all again for the help offered!

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.