-
Notifications
You must be signed in to change notification settings - Fork 154
Bug: unable to build with tsc when not using @middy/core #1080
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
any solution available rather installing middy as dev dependency? |
@obiwabrakenobi, not at this time, however we're happy to review & merge any PR coming from the community to fix the issue in a more timely manner. |
I'll have a look into it |
Thank you! |
Hi "AWS Lambda Powertools Team", |
|
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 Logger module without middy.Expected Behavior
Should be able to use Logger without the need to import middy when its not used. This is possible by importing the submodule via
import { Logger } from "@aws-lambda-powertools/logger/lib/Logger";
. If this is the solution maybe the documentation should reflect that.Current Behavior
Middy is required atleast as the dev dependency while compiling with
tsc
. This is not a problem whenesbuild
orts-node
is used.Possible Solution
Steps to Reproduce
Steps:
Logger
usingimport { Logger } from "@aws-lambda-powertools/logger";
tsc
Cannot find module '@middy/core' or its corresponding type declarations.
package.json
logger-demo
tsconfig.json
Environment
Related issues, RFCs
#1068
The text was updated successfully, but these errors were encountered: