Closed liqueflies closed 3 years ago
Thank you!!
A second note.. I would expect these errors to throw with the stack trace pointing to the source typescript files, not the compiled JS... is this an AWS-specific thing? (I haven't used lambdas in a while)
UPDATED: sorry for wrong package reference.
no changes on types.
A second note.. I would expect these errors to throw with the stack trace pointing to the source typescript files, not the compiled JS... is this an AWS-specific thing? (I haven't used lambdas in a while)
I didn't get what you would expect for that...
I'd expect the stack trace to look like this:
4:53:12 PM: 2020-11-10T15:53:12.187Z 4b7f18b7-99da-4b6a-87e9-1b2edc4a0451 INFO TypeError: realFetch.call is not a function
at module.exports (/var/task/src/lambda/onProductUpdate.ts:15:19) <- .ts, not .js
But, this was a fetch-related thing that is resolved anyway! I just want to add some info to the docs about this
Oops those failed builds are my fault. I'll fix and merge
I'd expect the stack trace to look like this:
4:53:12 PM: 2020-11-10T15:53:12.187Z 4b7f18b7-99da-4b6a-87e9-1b2edc4a0451 INFO TypeError: realFetch.call is not a function at module.exports (/var/task/src/lambda/onProductUpdate.ts:15:19) <- .ts, not .js
But, this was a fetch-related thing that is resolved anyway! I just want to add some info to the docs about this
Ok got what you are asking me. I think this is how lambda is bundled. It depends on how you build your lambda, is not something "node nuxt/next server integrated" but is bundled on it's own and minifies code. Maybe it's just webpack configuration stuff.
I created a new PR to merge this in since it wouldn't let me update yours. Thanks for your work on this!
Fix for aws lambda.
The problem was basically two:
fetch
tocross-fetch
(no, isomorphic was not working :/)statusCode
andbody
🎉
Happy merge, hope you like it 👯 🧦