Skip to content

May change the export of your library #188

@matthiasbaldi

Description

@matthiasbaldi

I tried to use this lib in a NestJS application.
If I wanted to serve the application and fetch requests I hit the following exeption:

[Nest] 14096   - 20.06.2021, 13:15:03   [ExceptionsHandler] ssl_checker_1.default is not a function +110990ms
TypeError: ssl_checker_1.default is not a function
    at AppService.getSslDetails (D:\projects\ssl-check-dashboard\dist\app.service.js:14:43)
    at AppController.getSSLStatus (D:\projects\ssl-check-dashboard\dist\app.controller.js:20:38)
    at D:\projects\ssl-check-dashboard\node_modules\@nestjs\core\router\router-execution-context.js:38:29
    at InterceptorsConsumer.intercept (D:\projects\ssl-check-dashboard\node_modules\@nestjs\core\interceptors\interceptors-consumer.js:11:20)
    at D:\projects\ssl-check-dashboard\node_modules\@nestjs\core\router\router-execution-context.js:46:60
    at D:\projects\ssl-check-dashboard\node_modules\@nestjs\core\router\router-proxy.js:9:23
    at Layer.handle [as handle_request] (D:\projects\ssl-check-dashboard\node_modules\express\lib\router\layer.js:95:5)
    at next (D:\projects\ssl-check-dashboard\node_modules\express\lib\router\route.js:137:13)
    at Route.dispatch (D:\projects\ssl-check-dashboard\node_modules\express\lib\router\route.js:112:3)
    at Layer.handle [as handle_request] (D:\projects\ssl-check-dashboard\node_modules\express\lib\router\layer.js:95:5)

I googled a bit and found a workaround to get it up and running.
When I set "esModuleInterop": true in the tsconfig I was able to use the library.

{
    "compilerOptions": {
        ... ,
        "esModuleInterop": true
    }
}

But it seems to be an issue with the default export you did in the library.

May you could check and fix that. :)
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions