Bcrypt help

i’m trying to hash username and password via bcrypt with 10 rounds and pass it as post data without success.
I’m using this script:

BLOCK:ConstantString
  value = $"<input.USERNAME><input.PASSWORD>"
  => VAR @pwd
ENDBLOCK

BLOCK:Script
INTERPRETER:NodeJS
INPUT pwd
BEGIN SCRIPT
const bcrypt = require("bcrypt");
const hash = bcrypt.hashSync(pwd, 10);
console.log(hash);
END SCRIPT
OUTPUT String @hash
ENDBLOCK

… but this doesn’t work.
It generates the hash and posts the data correctly but it seems like there’s a problem with the hash because i’m not getting the correct answer from the website.

When i’m using external websites (like devglan.com) to generate the hash it works just fine.

This solution doesn’t work either.

Can anyone help with this?