fastify / fastify-secure-session

Create a secure stateless cookie session for Fastify
MIT License
201 stars 45 forks source link

No native build was found - EsBuild AWS Lambda #192

Open rdzidziguri opened 1 year ago

rdzidziguri commented 1 year ago

Prerequisites

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.

mcollina commented 1 year ago

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

MagdielCAS commented 10 months ago

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'],