ng-clarity icon indicating copy to clipboard operation
ng-clarity copied to clipboard

Clarity is not compatible with Analog (SSR)

Open DmitryEfimenko opened this issue 9 months ago • 2 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

DmitryEfimenko avatar Oct 05 '23 05:10 DmitryEfimenko

This is likely not something we will focus on supporting.

kevinbuhmann avatar Jan 19 '24 18:01 kevinbuhmann

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.

DmitryEfimenko avatar Jan 19 '24 19:01 DmitryEfimenko