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

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

Open felabel opened this issue 1 year ago • 1 comments

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.

felabel avatar Oct 25 '24 02:10 felabel

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 09 '25 02:05 github-actions[bot]

This issue was closed because it has been stalled for 10 days with no activity.

github-actions[bot] avatar Aug 23 '25 02:08 github-actions[bot]