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
Attempting to import anything from docx when using CommonJS using TypeScript when moduleResolution is node16 results in a type error like:
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'.
This is because you haven't specified a CJS type declaration file. This tool explains the issue well, and also the solution.
The text was updated successfully, but these errors were encountered:
Attempting to import anything from
docx
when using CommonJS using TypeScript whenmoduleResolution
isnode16
results in a type error like:This is because you haven't specified a CJS type declaration file. This tool explains the issue well, and also the solution.
The text was updated successfully, but these errors were encountered: