node-argon2 icon indicating copy to clipboard operation
node-argon2 copied to clipboard

Error on AWS Lambda

Open guillaumecodet opened this issue 8 years ago • 2 comments

Hello guys, I'm trying to use argon2 on AWS Lambda, and I get an error when I call the function:

module initialization error: Error
at Object.Module._extensions..node (module.js:681:18)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at bindings (/var/task/node_modules/bindings/bindings.js:81:44)
at Object.<anonymous> (/var/task/node_modules/argon2/argon2.js:3:37)

The code I'm using

const argon2 = require('argon2');
argon2
          .hash(password, {
            type: argon2.argon2d
          })
          .then(hash => console.log(hash));

Expected behaviour

I should get the password hashed

Actual behaviour

I get an error

Environment

Operating system: AWS Lambda

Node version: 8.10

guillaumecodet avatar Sep 28 '18 13:09 guillaumecodet

The same issue here. Trying to investigate.

noo-zh avatar Oct 31 '18 12:10 noo-zh

It seems that bindings are not being compiled. Please try and leave feedback at #141

ranisalt avatar Oct 31 '18 19:10 ranisalt