This topic was automatically generated from Slack. You can find the original thread here.
Anyone else getting errors using the ‘date-fns’ package?
I have something as simple as:
import { format, addMinutes } from 'date-fns';
And I get the error of: Error Error: Package subpath './format/index.js' is not defined by "exports" in /tmp/__pdg__/dist/code/27385f004950730855bdb993d496a6bf0ebb39b32ed771166dacbfc79fd8d6ab/node_modules/.pnpm/date-fns-tz@2.0.0_date-fns@3.3.1/node_modules/date-fns/package.json imported from /tmp/__pdg__/dist/code/27385f004950730855bdb993d496a6bf0ebb39b32ed771166dacbfc79fd8d6ab/node_modules/.pnpm/date-fns-tz@2.0.0_date-fns@3.3.1/node_modules/date-fns-tz/esm/format/index.js
This has been working for a few months, and out of the blue it has just decided to throw this error
Successfully working as of 10 hours ago, no change, and now this
The error is because the latest version of date-fns-tz is not compatible with the latest version of date-fns. You’ll need to pin them to specific versions that confirmed working together