You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently upgraded to the latest version of this package, along side NextJS V13/React V18 etc.
And now getting the following error:
error - ReferenceError: window is not defined
at /private/tmp/react-flickity-component-example/node_modules/react-flickity-component/dist/react-flickity-component.umd.js:2:47057
at /private/tmp/react-flickity-component-example/node_modules/react-flickity-component/dist/react-flickity-component.umd.js:2:47088
at /private/tmp/react-flickity-component-example/node_modules/react-flickity-component/dist/react-flickity-component.umd.js:1:75
at Object.<anonymous> (/private/tmp/react-flickity-component-example/node_modules/react-flickity-component/dist/react-flickity-component.umd.js:1:279)
....
I found other issues #4 (comment) that attempt to solve this issue using the following:
However prior to upgrading to V4 we hadn't had this issue.
I've created a clean instance of the react-flickity-component-example, bringing it up to speed with the latest versions and was able to replicate the issue. See the window-error-demo branch.
Any idea how we can overcome this issue whilst keeping this component in SSR for performance reasons?
The text was updated successfully, but these errors were encountered:
Recently upgraded to the latest version of this package, along side NextJS V13/React V18 etc.
And now getting the following error:
I found other issues #4 (comment) that attempt to solve this issue using the following:
However prior to upgrading to V4 we hadn't had this issue.
I've created a clean instance of the react-flickity-component-example, bringing it up to speed with the latest versions and was able to replicate the issue. See the window-error-demo branch.
Any idea how we can overcome this issue whilst keeping this component in SSR for performance reasons?
The text was updated successfully, but these errors were encountered: