Skip to content

Error while capturing Stack trace - Missing mappings.wasm  #6

@mayanagarwal

Description

@mayanagarwal

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 '<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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions