Envek / aws-sam-typescript-layers-example

Example project for developing AWS Lambda functions on TypeScript with all goodies: local development, tests, debugging, shared layers (3rd party and your own), and deploy.

Home Page:https://evilmartians.com/chronicles/serverless-typescript-a-complete-setup-for-aws-sam-lambda

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Makefile errors out if types are defined in separate file.

schematis opened this issue · comments

I've been following your guide on evilmartians, but the build process errors out at:

echo "{\"extends\": \"./tsconfig.json\", \"include\": [\"${HANDLER}\"] }" > tsconfig-only-handler.json
npm run build -- --build tsconfig-only-handler.json

After looking into it, it appears that the new json file is not created at all and I'm unsure about how to get it to create.

Node: 16.13.1 (Also doesn't work on 14.x)
SAM CLI: 1.36.0

Ok this is what I believe is the real issue after downloading the template and doing testing to see where it broke.

If I have project specific types defined in a types.d.ts (or similar) file, the makefile will not run the function specific make operations. I moved the types into the relevant file and sam build ran without error.