Skip to content

"Window is not an object" when having SSR enabled in Angular #2010

@HaychBe

Description

@HaychBe

Describe the bug

As the title suggests really. If you have SSR enabled, it doesn't seem to like the import. As described in your documentation

importProvidersFrom(AngularSlickgridModule.forRoot()), // <- notice!

Has any workaround been found for this or can you just not use SSR with SlickGrid?

15:41:48 [vite] (ssr) Error when evaluating SSR module /main.server.mjs: window is not defined
      at eval (C:\xxx\xxx\Frontend\xxx\.angular\cache\19.2.9\xxx\vite\deps_ssr\angular-slickgrid.js:30395:1)   

Reproduction

Just enabled SSR and import AngularSlickGridModule

Which Framework are you using?

Angular

Environment Info

| Executable          | Version |
| ------------------- | ------- |
| (framework used)    | ^19.2.0 |
| Slickgrid-Universal | ^9.2.0  |
| TypeScript          | ~5.7.2  |

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions