vmware-clarity / ng-clarity

Clarity Angular is a scalable, accessible, customizable, open-source design system built for Angular.
https://clarity.design
Other
318 stars 72 forks source link

Clarity is not compatible with Analog (SSR) #984

Open DmitryEfimenko opened 9 months ago

DmitryEfimenko commented 9 months ago

This is a bug report for the @clr Angular or UI versions of the design system.

Describe the bug

Clarity is not compatible with Analog

How to reproduce

Steps to reproduce the behavior:

  1. Create an Analog app following the Getting Started instructions here
  2. Add Clarity following instructions here
    • The new app uses standalone components so there won't be an AppModule. Instead, add ClarityModule to the imports of the AppComponent
  3. Run npm start
  4. See error
    ERROR Error: Uncaught (in promise): ReferenceError: window is not defined
    ReferenceError: window is not defined
    at [path to the app]/node_modules/@cds/core/internal/utils/exists.js:1:209

Expected behavior

Application should run

Versions

Clarity version:

Framework version:

Angular 16

Device:

Additional notes

I suspect there would be similar error even just for a standard Angular SSR integration

kevinbuhmann commented 5 months ago

This is likely not something we will focus on supporting.

DmitryEfimenko commented 5 months ago

Server-side rendering is important for many, many apps these days. Not supporting SSR, will automatically remove Clarity as an option for many projects.

I hope you'll reconsider.