Hacker0x01 / react-datepicker

A simple and reusable datepicker component for React
https://reactdatepicker.com/
MIT License
7.89k stars 2.23k forks source link

./node_modules/date-fns/startOfISOWeek.mjs #4721

Open dawood-chopdawg opened 2 months ago

dawood-chopdawg commented 2 months ago

Screenshot 2024-04-24 082139 Describe the bug ./node_modules/date-fns/startOfISOWeek.mjs Can't import the named export 'startOfWeek' from non EcmaScript module (only default export is available) // I am getitng this error I installed the library in my react js app, but I am not able to use it as I am getting the above error, i also shared the screenshort.

To Reproduce Steps to reproduce the behavior:

Expected behavior The react-datepicker should work consistantly.

Screenshots I shared the screen short

Desktop (please complete the following information):

victorsouza-mnz commented 2 months ago

i think you project's webpack config is off for .mjs files, this files have appered in newer version of date-fns

you either can try to configure your webpack ( the solution depends on how your project was configured )

or you can donwgrade react-datepicker to some old version that uses older date-fns as dependency