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

Cannot find module 'date-fns/types' or its corresponding type declarations

Open mikejcoop opened this issue 1 year ago • 1 comments

I am getting this Typescript error:

node_modules/react-datepicker/dist/calendar.d.ts:10:26 - error TS2307: Cannot find module 'date-fns/types' or its corresponding type declarations.

import type { Day } from "date-fns/types";

date-fns includes types now, so I believe this can be changed to: import type { Day } from "date-fns";

Using: date-fns: 3.6.0 react-datepicker: 7.2.0

mikejcoop avatar Jun 28 '24 15:06 mikejcoop

@mikejcoop I tried with codesandbox but could not reproduce. https://codesandbox.io/p/sandbox/react-datepicker-4946-mp4yl5?file=%2Fsrc%2FApp.tsx%3A4%2C1

Can you provide the code to reproduce it?

yuki0410-dev avatar Jun 29 '24 15:06 yuki0410-dev

I've not been able to reproduce it in Code Sandbox, so it must been something else with my environment. Thanks for checking.

mikejcoop avatar Jul 02 '24 10:07 mikejcoop