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

reactdatepicker.com shows blank page

Open ilkou opened this issue 1 year ago • 17 comments

Describe the bug The official website is down, it shows a blank page! I've attached a screenshot of the console error

Screenshots Screenshot 2024-09-22 at 19 59 54

ilkou avatar Sep 22 '24 19:09 ilkou

I am experiencing the same thing

ryanadhi avatar Sep 23 '24 03:09 ryanadhi

I am experiencing the same thing

velo-kim avatar Sep 23 '24 04:09 velo-kim

I am experienceing same

piyushimraw avatar Sep 23 '24 08:09 piyushimraw

same here

manoushka avatar Sep 23 '24 15:09 manoushka

same here

johannrp27 avatar Sep 23 '24 16:09 johannrp27

Locally it's working fine, it seems somewhere in the build step things may be going wrong. Is anyone able to look into this?

martijnrusschen avatar Sep 24 '24 06:09 martijnrusschen

I just have downloaded the repo to play locally: yarn, yarn build and lastly yarn start. Still not working.

image

johannrp27 avatar Sep 24 '24 19:09 johannrp27

When I run this locally I get the same format error. Looks like for this import:

import { format, longFormatters } from "date-fns/format";

ends up now with format being undefined. Looks like date-fns just got updated so I'm guessing it's from that. Probably some breaking change in 4.0 that isn't handled.

BruceHubbard avatar Sep 25 '24 20:09 BruceHubbard

@BruceHubbard Nice find, here's the PR that upgraded date-fns: https://github.com/Hacker0x01/react-datepicker/pull/5102

martijnrusschen avatar Sep 25 '24 20:09 martijnrusschen

@BruceHubbard what happens if you change this to import { format, longFormatters } from "date-fns"; Looking at the date-fns readme that's how they do the import.

martijnrusschen avatar Sep 25 '24 20:09 martijnrusschen

How come that update got there? If the diff between v7.3 and v7.4 was just a minor of date-fns

johannrp27 avatar Sep 25 '24 20:09 johannrp27

The docs site is running from the master version of the Datepicker. So it's slightly ahead of the v7.4 version.

martijnrusschen avatar Sep 25 '24 20:09 martijnrusschen

Nice, I just downgrade date-fns from v4 to v3 and everything is working now, so that's the issue. As @BruceHubbard said it's a good clue. I did try to find every format and replace it with the import suggested but still not working. I'll keep searching

johannrp27 avatar Sep 25 '24 20:09 johannrp27

@johannrp27 ok thank you! What I can do:

  1. revert the upgrade to bring back the site
  2. once you've found the fix, you can include the upgrade in the PR

martijnrusschen avatar Sep 25 '24 20:09 martijnrusschen

Revert is merged, https://reactdatepicker.com is back alive! Now, let's figure out how we can make this upgrade work :)

martijnrusschen avatar Sep 25 '24 20:09 martijnrusschen

Thanks Martjin for the quick fix!

BruceHubbard avatar Sep 25 '24 20:09 BruceHubbard

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar May 11 '25 02:05 github-actions[bot]