hypeserver / react-date-range

A React component for choosing dates and date ranges.
MIT License
2.59k stars 672 forks source link

Can't resolve 'date-fns/locale/en-US' in eact-date-range #359

Closed GaurabendwithB closed 4 years ago

GaurabendwithB commented 4 years ago

Its time to update date-fns

Date range is throughing error because of date-fns Can't resolve 'date-fns/locale/en-US' in '\node_modules\react-date-range\dist\components\Calendar'

onurkerimov commented 4 years ago

Hi, its answered here. I'm closing this issue.

alexfornuto commented 3 years ago

What would be the next troubleshooting step when encountering this error if date-fns is already installed?

alexfornuto commented 3 years ago

It would appear that var _enUS = _interopRequireDefault(require("date-fns/locale/en-US")); is not valid, as the ~current~ form of date-fns (edit: perhaps out of date on my project) only has /locale/en, not /locale/en-US.