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

ReferenceError: window is not defined #97

Open
IvonaPilcevic opened this issue Dec 15, 2020 · 0 comments
Open

ReferenceError: window is not defined #97

IvonaPilcevic opened this issue Dec 15, 2020 · 0 comments

Comments

@IvonaPilcevic
Copy link

IvonaPilcevic commented Dec 15, 2020

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?

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

1 participant