fastify-secure-session icon indicating copy to clipboard operation
fastify-secure-session copied to clipboard

No native build was found - EsBuild AWS Lambda

Open rdzidziguri opened this issue 2 years ago • 2 comments

Prerequisites

  • [X] I have written a descriptive issue title
  • [X] I have searched existing issues to ensure the issue has not already been raised

Issue

I understand that we are relying on a native module, so this might not be a straightforward approach to shoot and deploy; however, I was wondering if anyone could achieve a successful code build with fastify lambda and this package. Whenever using esbuild to bundle it I end up with the error No native build was found.

rdzidziguri avatar Jul 15 '23 12:07 rdzidziguri

I don't know how to help with this, it's a matter of letting the module find its binary.

mcollina avatar Jul 15 '23 16:07 mcollina

Hi @rdzidziguri, I was having the exact same issue, after some time I was able to fix it by adding the following esbuild config:

platform: "node",
packages: "external",
entryPoints: ['path/to/index.ts'],

MagdielCAS avatar Oct 23 '23 14:10 MagdielCAS