react-coverflow icon indicating copy to clipboard operation
react-coverflow copied to clipboard

ReferenceError: window is not defined

Open IvonaPilcevic opened this issue 5 years ago • 0 comments

When I try to use coverflow it just says "ReferenceError: window is not defined" and it doesn't work.

I am using react with nextjs. For now, I found a hotfix using `let Carousel = null;

try { if (global.window) { Carousel = require("react-coverflow"); } } catch (error) { console.log("!coverflow-error ", error); }`

but it's still showing me a warning Warning: Expected server HTML to contain a matching <div> in <div>. . Is there any better solution?

IvonaPilcevic avatar Dec 15 '20 12:12 IvonaPilcevic