You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I inherited a TypeScript project that has not been compiling in a long time, it seems. One error deals with it having both date-fns and luxon in the same project, along with corresponding types, that seem to crash.
node_modules/@date-io/date-fns/type/index.d.ts:2:15 - error TS2300: Duplicate identifier 'DateType'.
2 export type DateType = Date;
~~~~~~~~
node_modules/@date-io/luxon/type/index.d.ts:4:15
4 export type DateType = DateTime;
~~~~~~~~
'DateType' was also declared here.
node_modules/@date-io/luxon/type/index.d.ts:4:15 - error TS2300: Duplicate identifier 'DateType'.
4 export type DateType = DateTime;
~~~~~~~~
node_modules/@date-io/date-fns/type/index.d.ts:2:15
2 export type DateType = Date;
~~~~~~~~
'DateType' was also declared here.
Aside from the fact that these two libraries are overlapping in functionality (and I should probably refactor to just have one), what is the proper fix here? My quick fix was simply to remove one of the offending files in node_modules, but that's hardly a proper solution ... (although it does the job when paired with patch-package)
The text was updated successfully, but these errors were encountered:
It's a problem – we are not using this ephimeral type anymore and there is a PR #416 to remove support but it will require major upgrade which is hard to adopt
I inherited a TypeScript project that has not been compiling in a long time, it seems. One error deals with it having both
date-fns
andluxon
in the same project, along with corresponding types, that seem to crash.Aside from the fact that these two libraries are overlapping in functionality (and I should probably refactor to just have one), what is the proper fix here? My quick fix was simply to remove one of the offending files in
node_modules
, but that's hardly a proper solution ... (although it does the job when paired with patch-package)The text was updated successfully, but these errors were encountered: