pughpugh / react-countdown-clock

HTML5 canvas countdown clock React component
ISC License
187 stars 83 forks source link

Error on Server-Side #60

Closed FabianSellmann closed 3 years ago

FabianSellmann commented 6 years ago

_scale: window.devicePixelRatio || 1 will throw an error since window is not defined on the server. Since this is a static property, error will be thrown already when you import the the module.

hello-alf commented 5 years ago

I have this problem too

codesignist commented 5 years ago

If you use next.js you can render on client side.

https://nextjs.org/docs#with-no-ssr

jtterra commented 4 years ago

No fixes yet ?

pughpugh commented 3 years ago

Thaks for reporting this. I've not got this set up to replicate, but I've pushed a fix. Let me know if there are any issues.