node_modules/@date-fns/tz/date/index.d.cts:1:37 - error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("../constants/index.ts")' call instead.
1 import { constructFromSymbol } from "../constants/index.ts";
Modifying the line from
import { constructFromSymbol } from "../constants/index.ts";
to
import { constructFromSymbol } from "../constants/index.cts";
When I import
TZDate
like so:I get the following error:
Modifying the line from
to
fixes the error.