I am trying to make my express.js
app works on AWS Lambda
. The deployment (using serverless framework
completes successfully, however the app returns a 500 internal error
when I test my requests. My logs shows me this error :
/var/task/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node: invalid ELF header
.
I've tried to replace bcrypt
with bcryptjs
but the problem persists.
Also, in my serverless.yml
, I've added the following line to force lambda to install bcrypt
by itself, but apparently it didn't make the trick :
package:
exclude:
- node_modules/**
Any suggestion ?