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

Module '"date-fns/addDays"' has no exported member 'addDays' #5192

Open
felabel opened this issue Oct 25, 2024 · 0 comments
Open

Module '"date-fns/addDays"' has no exported member 'addDays' #5192

felabel opened this issue Oct 25, 2024 · 0 comments

Comments

@felabel
Copy link

felabel commented Oct 25, 2024

Describe the bug
When vercel is deploying my typescript project, it gives an error of Module '"date-fns/addDays"' has no exported member 'addDays'. Did you mean to use 'import addDays from "date-fns/addDays"' instead? This goes on for all the 31 imports

I saw this error on local and I resolved it by changing import { addDays } from "date-fns/addDays";
to import addDays from "date-fns/addDays";
However, vercel doesn't use my local nodemodules folder, it generates it's own during deployment so it's still encountering same issue. How do I resolve this
To Reproduce
Steps to reproduce the behavior:

  1. Install latest version of react-datepicker
  2. Build on vercel to see error

Expected behavior
It should build successfully without errors from date-picker

Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot 2024-10-25 at 03 22 00
Screenshot 2024-10-25 at 03 22 19

Additional context
I have tried importing date-fns as a direct dependey, still didn't work, kindly assist.

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

1 participant