aws / aws-toolkit-jetbrains

AWS Toolkit for JetBrains - a plugin for interacting with AWS from JetBrains IDEs
https://plugins.jetbrains.com/plugin/11349-aws-toolkit
Apache License 2.0
768 stars 226 forks source link

Typescript project getting `Cannot find handler` for local debug configuration #2505

Open flexelem opened 3 years ago

flexelem commented 3 years ago

Describe the bug

I am able configure and debug my Java lambdas successfully, however, I am not able to debug my lambdas written in typescript. When I try to create a debug configuration I get Cannot find handler 'src/lambda/hello-world.handler' in project

To reproduce

  1. Create a new javascript project with npm init
  2. Create sub directory with mkdir -R src/lambda
  3. Create a hello world example file with name hello-world.ts under src/lambda.

A sample code for an REST API;

import { APIGatewayProxyEventV2, APIGatewayProxyHandlerV2, APIGatewayProxyResultV2 } from 'aws-lambda';

export const handler: APIGatewayProxyHandlerV2 = async (event: APIGatewayProxyEventV2) : Promise<APIGatewayProxyResultV2> => {
    console.log(event);
    return {
        statusCode: 200,
    };
};

Expected behavior

Create debug configuration for typescript handler.

Screenshots

project-directory error

Your Environment

Additional context

abrooksv commented 3 years ago

Hi Burak,

We do not have TypeScript support enabled yet (it's in a feature branch currently).

flexelem commented 3 years ago

Hi Austin,

That is sad :(. Thanks a lot for informing though. Great product!

abrooksv commented 3 years ago

Feature branch is: https://github.com/aws/aws-toolkit-jetbrains/tree/feature/typescript

flexelem commented 2 years ago

Hi there,

I am reopening this to learn if typescript is supported. Thanks!

Best, Burak

stp-engineering-goodgames commented 1 year ago

it would really be great if typescript was supported. any news?