aws-sam-typescript-layers-example
aws-sam-typescript-layers-example copied to clipboard
Makefile errors out if types are defined in separate file.
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.