question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

throws an error ReferenceError: document is not defined when rendered on server.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
vizFluxcommented, Jul 31, 2019

If you’re using NextJS for your SSR app, I solved the issue with dynamic import like so: const Image = dynamic(() => import('react-graceful-image'));

1reaction
linasmnewcommented, Apr 19, 2020

Fixed in 1.3.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is Server-Side Rendering? Definition and FAQs
Server -side rendering (SSR) is an application's ability to convert HTML files on the server into a fully rendered HTML page for the...
Read more >
Client-side vs. server-side rendering: why it's not all black and ...
Server -side rendering is the most common method for displaying information onto the screen. It works by converting HTML files in the server...
Read more >
Rendering on the Web
Server rendering generates the full HTML for a page on the server in response to navigation. This avoids additional round-trips for data ...
Read more >
What is server-side rendering? - Educative.io
Server -side rendering (SSR), is the ability of an application to contribute by displaying the web-page on the server instead of rendering it...
Read more >
What's Server Side Rendering and do I need it? - Medium
C — Create a server-side rendered application in JS. One of the big selling point of the current generation of JS applications is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found