You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to deploy my TypeScript Lambdas using the @aws-cdk/aws-lambda-nodejs the invocations fail with:
2021-09-21T16:19:24.193Z undefined ERROR Uncaught Exception {
"errorType": "Error",
"errorMessage": "make sure you have enabled the typescript compiler options which enable us to work with decorators (see doc)",
"stack": [
"Error: make sure you have enabled the typescript compiler options which enable us to work with decorators (see doc)",
" at createNewProperty (/var/task/index.js:33673:15)",
" at Object.initOrUpdateProperty (/var/task/index.js:33665:20)",
" at /var/task/index.js:33947:46",
" at __decorateClass (/var/task/index.js:66:24)",
" at model/api-key.ts (/var/task/index.js:38123:5)",
" at __init (/var/task/index.js:41:50)",
" at Object.<anonymous> (/var/task/index.js:38166:18)",
" at Module._compile (internal/modules/cjs/loader.js:1072:14)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)",
" at Module.load (internal/modules/cjs/loader.js:937:32)"
]
}
However for some reason transpiling with tsc first doesn't solve the issue either.
A PR is currently open in the @aws-cdk repo to do exactly this to work around this. I tried their approach without success. Will this PR make dynamo-easy work with @aws-cdk/aws-lambda-nodejs?
To Reproduce
Steps to reproduce the behavior:
Write a function using decorators from dynamo-easy
Deploy them using @aws-cdk/aws-lambda-nodejs
Invoke them
See error
Expected behavior
Additional context
The text was updated successfully, but these errors were encountered:
@matthias-pichler-warrify Transpiling first and pass the output to esbuild is indeed working for me, I'm not sure why this isn't working for you. Could you please share a minmal repo of the bug you're facing. I would really like to take a look.
closing this in favour of #374 holding relevant topics to be updated in the docs, serving as a knowledge base for now and also describing the strategy of the technical solution of the documentation part, envision it to be closer to the source code of the project
Describe the bug
When I try to deploy my TypeScript Lambdas using the
@aws-cdk/aws-lambda-nodejs
the invocations fail with:Since
@aws-cdk/aws-lambda-nodejs
uses esbuild which doesn't supportemitDecoratorMetadata
this isn't surprising.However for some reason transpiling with
tsc
first doesn't solve the issue either.A PR is currently open in the
@aws-cdk
repo to do exactly this to work around this. I tried their approach without success. Will this PR makedynamo-easy
work with@aws-cdk/aws-lambda-nodejs
?To Reproduce
Steps to reproduce the behavior:
dynamo-easy
@aws-cdk/aws-lambda-nodejs
Expected behavior
Additional context
The text was updated successfully, but these errors were encountered: