gajus / gajus/get-stack-trace

Error while capturing Stack trace - Missing mappings.wasm

Open
#6 3 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
14
Forks
3
PR merge metrics
No merged PRs in 30d

Description

## Current Behaviour

I am using slonik as a postgres-client to talk to my database. It is being used in 2 places -
1. Inside a Graphql query which runs on serverless (lambda on aws).
2. Directly fetching data from node cli scripts.

In the first scenario, I get an error message - `ENOENT: no such file or directory, open '/.esbuild/.build/src/handlers/mappings.wasm'`. Which suggests that it is looking for that file in order to capture stack trace.

esbuild config in serverless -
```
esbuild:
loader:
.graphql: text
.html: text
packager: npm
bundle: true
minify: true
sourcemap: true
keepNames: true
concurrency: 8
exclude:
- pg-native
```
also the order for plugins in correct in serverless

In the second scenario, it works like a charm. I am able to talk to my db and also get the stack trace which is super helpful.

## Possible Solution

Not sure about the possible solution but I can temporarily disable slonik to capture stack trace by setting `captureStackTrace: false` while creating pool.

## Logs

Unable to produce a details log because `captureStackTrace` itself is throwing error.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.