Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bcrypt does not work on lambda serverless

I added the bcrypt module, in local it works, but it does not work when I deploy I test the function and show this:

errorMessage": "/var/task/node_modules/bcrypt/lib/binding/bcrypt_lib.node: invalid ELF header
like image 977
Diego Santa Cruz Mendezú Avatar asked Jun 23 '19 02:06

Diego Santa Cruz Mendezú


1 Answers

You need to deploy using linux environment. If you deploy it from windows machine this error occurred.

Alternatively you can use bcryptjs instead of bcrypt

like image 105
Supun Induwara Avatar answered Nov 07 '22 02:11

Supun Induwara