Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does powerbi-cilent-angular library supports server side rendering? #44

Closed
SarangNasare01 opened this issue Sep 1, 2023 · 2 comments
Closed

Comments

@SarangNasare01
Copy link

We have an angular application in which we are using powerbi-cilent-angular library for embedding power bi report. the application is running fine when we locally run it. When we are building SSR (Server side Rendering) package to deploy on the node. Package is getting successfully build but when we deploy it on node it does not work and gives below error.
If we build SSR (Server side Rendering) package after commenting out powerbi-cilent-angular library that package works on the node but then obviously embedding report functionality does not work.
So Does powerbi-cilent-angular library supports server side rendering?

image

@SarangNasare01 SarangNasare01 changed the title Does this library supports server side rendering? Does powerbi-cilent-angular library supports server side rendering? Sep 1, 2023
@rad10wave
Copy link

The powerbi-cilent-angular library doesn't support server-side rendering, this library relies on window reference, which cannot be used in server-side rendering.

There are few potential solution for addressing this issue:

  • Add a condition to check if window object exists before using the code. But it will skip the line of codes which relies on window object.
  • Another approach will be to use dynamic import or lazy loading. It will make sure that the code is executed only in the browser, where window object is present.

@may-hartov
Copy link
Contributor

Behavior is expected by design, server-side rendering is not supported. Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants