30.11.2022 |

Source Maps with AWS Lambda and Node.js

Turns out we didn't had a working solution for our internal Automate-All-The-Things-Projekt. When you try to debug something and line 15188 does not even exist. Don't forget to also use NODE_OPTIONS: --enable-source-maps to get accurate file names and line numbers in your error logs. No additional packages needed.

Go from:

TypeError: Cannot read properties of undefined (reading 'replace')
    at Runtime.handler (/var/task/src/recruitment/incoming-mail.js:15188:29)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

To:

TypeError: Cannot read properties of undefined (reading 'from')
    at Runtime.handler (/src/recruitment/incoming-mail.ts:35:55)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

See also https://indieweb.social/@jansauer/109427654986910608

Jan
Zur Übersicht

Mehr vom DevSquad...

Sophia Brandt

Tips for using Mastodon and the Fediverse

Jan Sauer

Please tell me that this is fake