Closed xavisavvy closed 5 years ago
i have the same problem :(
i found a fix :
if(typeof window !== "undefined"){
window.scrollTo (0, 0);
}
i don't understand it but it works
I get the same issue using Nextjs. There are several spots in react-pricing-table/lib/react-pricing-table.js
that access the window object without null checking first.
@HeadsongStudio try to use my solution it works well on my side
I'm trying to fix this week but I appreciate any help I can get as I recently started a new project and don't have much time any more.
I had this same problem and turns out that main reason for this is "style-loader" library that is in use. I replaced that with "iso-morphic-style-loader" and that fixes the problem.
This was effectively fixed by @omjokine and published to NPM in 0.0.3, think we can close this issue. Thanks for the work !
Is there any way to easily accommodate for React-router server side rendering w/ Webpack (example setup https://alligator.io/react/react-router-ssr/)? Trying to squeeze some SEO, and despite my best efforts with some pretty gnarly hacks I still get window is not defined
Error:
Some other peeps who seemed to have same issue on other react components but fixed it - https://github.com/airbnb/lottie-web/issues/440