Skip to content

Multi-language Support #165

Open
Open
@jgreen01su

Description

@jgreen01su

I want to setup a multi-language API while using this plugin to allow me to use TypeScript.

Example

functions:
  hello:
    runtime: nodejs10.x
    handler: hello.world # hello.ts
  webapi:
    runtime: python3.8
    handler: webapi # webapi.py

Issue
When I add handlers written in other languages I receive the following error.

Serverless: Using local tsconfig.json
{
  file: undefined,
  start: undefined,
  length: undefined,
  messageText: "File 'webapi.ts' not found.",
  category: 1,
  code: 6053,
  reportsUnnecessary: undefined
}
 
  Type Error ---------------------------------------------
 
  Cannot read property 'getLineAndCharacterOfPosition' of undefined
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information ---------------------------
     OS:                     darwin
     Node Version:           12.6.0
     Serverless Version:     1.47.0

It seems like this plugin tries to transpile all handlers as if they were in ts files regardless of the selected runtime.

Is there a workaround for this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions