Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type 'typeof WinstonCloudwatch' has no construct signatures` #221

Open
thom-nic opened this issue Sep 29, 2023 · 1 comment
Open

Type 'typeof WinstonCloudwatch' has no construct signatures` #221

thom-nic opened this issue Sep 29, 2023 · 1 comment

Comments

@thom-nic
Copy link

Full error:

TSError: ⨯ Unable to compile TypeScript
app/logger.ts (44,19): This expression is not constructable.
  Type 'typeof WinstonCloudwatch' has no construct signatures. (2351)

code:

import * as WinstonCloudwatch from 'winston-cloudwatch';
import winston from 'winston';
import pkg from '../package.json';

  winston.add(new WinstonCloudwatch({
    logGroupName: pkg.name,
    logStreamName: 'app',
  }));

Runnng typescript@5 and Nodejs 14

@linosorice
Copy link

I resolved changing the import

import WinstonCloudWatch from 'winston-cloudwatch'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants