-
Notifications
You must be signed in to change notification settings - Fork 154
Bug: unable to build with tsc when not using @middy/core #1081
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
Comments
|
We just released version You can read more about the fix in #1225, however now you should be able to transpile your functions with I have tested "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tracer_1 = require("@aws-lambda-powertools/tracer");
// import { captureLambdaHandler } from '@aws-lambda-powertools/tracer'
const tracer = new tracer_1.Tracer(); Hope this helps! |
Bug description
The code doesn't compile using tsc when using the Metrics module without middy.
Expected Behavior
Should be able to use Metrics without the need to import middy when its not used. Unlike
Logger
importing the submodule viaimport { Metrics } from '@aws-lambda-powertools/metrics/lib/Metrics';
fails to compile too.Current Behavior
Middy is required atleast as the dev dependency while compiling with tsc. This is not a problem when esbuild or ts-node is used.
Possible Solution
Steps to Reproduce
Steps:
import { Metrics } from "@aws-lambda-powertools/metrics";
Cannot find module '@middy/core' or its corresponding type declarations.
package.json
metrics-demo
tsconfig.json
Environment
Related issues, RFCs
#1068
#1080
The text was updated successfully, but these errors were encountered: