[AdapterDateFns] Error installation latest version of date-fs package
Steps to reproduce
I use date-fs package in all my project.
When I update/install package from v.2.30.0 to latest v.3.3.1 get an error.
Link to live example: (required) : https://codesandbox.io/p/sandbox/unruffled-cdn-nk68d2 If you remove from the package "date-fs": "latest”, the project runs. If you include it, the project not run.
Steps: Install the latest version of date-fs (v.3.3.1):
npm install date-fs@latest it gives me this error:
✘ [ERROR] Missing "./_lib/format/longFormatters" specifier in "date-fns" package [plugin vite:dep-pre-bundle]
node_modules/@mui/x-date-pickers/AdapterDateFns/AdapterDateFns.js:58:27:
58 │ import longFormatters from 'date-fns/_lib/format/longFormatters';
Thanks in advance.
Current behavior
Not install the latest version of date-fs.
Expected behavior
Install / update the latest version date-fs package.
Context
Update the latest version of my libraries.
Your environment
npx @mui/envinfo
Don't forget to mention which browser you used.
Output from `npx @mui/envinfo` goes here.
Search keywords: date-fs
Hi,
You should use :AdapterDateFnsV3 which is available on the latest v6 releases (and v7 beta)
See https://mui.com/x/react-date-pickers/adapters-locale/#with-date-fns for more information
Excellent! Thank you!