Open dlopatiuk22 opened 7 months ago
Sorry for the late response. I've tried now with TS 5.4.5 and it works. Can you paste your code and configurations?
it's work in CommonJS mode. and this issue happen in module mode.
Can you please paste your tsconfig, package.json and perhaps the client code? I tried using the module mode, and it all works under this configuration:
package.json:
"type": "module"
tsconfig:
"target": "ESNext"
"module": "ESNext"
"moduleResolution": "node10"
This way or another, i've added a named export for Downloader class. After playing around, seems that some problems arise from handling of default exports. Please upgrade to version 4.13.0, and use:
import {Downloader} from 'nodejs-file-downloader'
Not work with TS v5.4.2
Error Type 'typeof import("d:/work/other/export-data-from-contentful/node_modules/nodejs-file-downloader/Downloader.td")' has no construct signatures.