konstantinmuenster/gatsby-starter-portfolio-minimal

"window is not defined"

maxgraze-zz opened this issue · 2 comments

Getting this issue at build time:

window not defined

The odd part is I already deployed it to netflify. Anyone else come across and solved this problem? Thanks!

Hi!

Did you add custom code to the layout.js file? Cause I couldn't find the code snippet you posted.

In general, window is not available during build time hence it should be wrapped in an isSSR condition like here: https://github.com/konstantinmuenster/gatsby-starter-portfolio-minimal/blob/master/src/components/header.js#L82.

Maybe that already solves your issue?

Closed due to inactivity.