vmware-clarity / ng-clarity

Clarity Angular is a scalable, accessible, customizable, open-source design system built for Angular.

Home Page:https://clarity.design

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clarity is not compatible with Analog (SSR)

DmitryEfimenko opened this issue · comments

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
  1. Run npm start
  2. 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:

  • @cds/core: "6.7.0"
  • @clr/angular: "16.0.0"
  • @clr/ui: "16.0.0"

Framework version:

Angular 16

Device:

  • Type: Desktop
  • OS: Windows - running project on WSL 2
  • Browser: N/A
  • Version: N/A

Additional notes

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

This is likely not something we will focus on supporting.

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.