Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dawood-chopdawg opened this issue Apr 24, 2024 · 1 comment
Open

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

dawood-chopdawg opened this issue Apr 24, 2024 · 1 comment

Comments

@dawood-chopdawg
Copy link

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):

  • OS: [Windows 10]
  • Browser [chrome]
  • Version [4.0.3] // also tried the latest version but still got the issue.
@victorsouza-mnz
Copy link

victorsouza-mnz commented Apr 25, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants