-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Current Behaviour
I am using slonik as a postgres-client to talk to my database. It is being used in 2 places -
- Inside a Graphql query which runs on serverless (lambda on aws).
- Directly fetching data from node cli scripts.
In the first scenario, I get an error message - ENOENT: no such file or directory, open '<PATH TO>/.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.