Skip to content

aws-events: EventsMetrics are not exported #22166

@Lewenhaupt

Description

@Lewenhaupt

Describe the bug

We tried to utilise EventMetrics from aws-events/lib/events-canned-metrics-generated but this isn't actually exported.
This is the error we receive when we tried to import it: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './aws-events/lib/events-canned-metrics.generated' is not defined by "exports" in /node_modules/aws-cdk-lib/package.json
I don't think this should be exported like that but the problem is that index.js in aws-events does not re-export it.

Expected Behavior

Expect aws-events/lib/index.js to export * from 'events-canned-metrics.generated'.

Current Behavior

aws-events/lib/index.js does not export * from 'events-canned-metrics.generated'.

Reproduction Steps

Try to import EventMetrics

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.38.1 (build a5ced21)

Framework Version

No response

Node.js Version

v16.9.1

OS

mac os

Language

Typescript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-eventsRelated to CloudWatch Eventseffort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions