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 just made initial setup of typesafe-i18n, trying to build my project now and stumbled into 3 TS errors
node_modules/typesafe-i18n/runtime/esm/runtime/src/index.d.ts:1:15 - 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("../../../../types/runtime/src/index.mjs")' call instead.
1 export * from '../../../../types/runtime/src/index.mjs'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/typesafe-i18n/detectors/index.d.ts:1:15 - 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("../types/detectors/src/index.mjs")' call instead.
1 export * from '../types/detectors/src/index.mjs'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/typesafe-i18n/utils/index.d.ts:1:15 - 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("../types/utils/src/index.mjs")' call instead.
1 export * from '../types/utils/src/index.mjs'
I figured out the reason. Typescript reasonably consider node_modules/typesafe-i18n/utils/index.d.ts as CommonJS module because there is no type: "module" in `package.json.
Version
5.26.2
Describe the bug
I just made initial setup of
typesafe-i18n
, trying to build my project now and stumbled into 3 TS errorsReproduction
Logs
No response
Config
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: