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

Attempted import error: 'format' is not exported from 'date-fns/format' (imported as 'dateFnsFormat'). #291

Open
rohitmpatil-iprogrammer opened this issue Jul 23, 2024 · 3 comments

Comments

@rohitmpatil-iprogrammer

I am using as

import { toZonedTime } from 'date-fns-tz'
import { format, getTime, parseISO, formatDistanceToNow, differenceInSeconds } from 'date-fns';

@rohitmpatil-iprogrammer
Copy link
Author

"date-fns": "^2.30.0",
"date-fns-tz": "^3.1.3",

@rohitmpatil-iprogrammer
Copy link
Author

Upgraded to 3.6.0

and removed date-fns-tz

getting new error
./node_modules/date-fns/_lib/format/longFormatters/index.js
Error: Failed to read source code from /home/rohit/Iprogrammer-projects/Auximtec/lc-admin/node_modules/date-fns/_lib/format/longFormatters/index.js

Caused by:
No such file or directory (os error 2)

@ats05
Copy link

ats05 commented Jul 30, 2024

I also encountered a similar error, but it was resolved by updating date-fns to the latest version: 3.6.

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