Bcrypt is the best method to store password in database. I use expressJS as framework. I use node.bcrypt.js in repo https://www.npmjs.com/package/bcrypt for my project.
This package isn’t native pure javascript. This is c++ binding r
> bcrypt@3.0.6 install /home/testInstallBycrypt/node_modules/bcrypt
> node-pre-gyp install — fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for bcrypt@3.0.6 and node@10.15.3 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir ‘/home/testInstallBycrypt/node_modules/bcrypt/lib’
gyp WARN EACCES user “root” does not have permission to access the dev dir “/root/.node-gyp/10.15.3”
gyp WARN EACCES attempting to reinstall using temporary dev dir “/home/testInstallBycrypt/node_modules/bcrypt/.node-gyp”
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir ‘/home/testInstallBycrypt/node_modules/bcrypt/.node-gyp’
gyp ERR! System Linux 4.9.0–9-amd64
gyp ERR! command “/usr/bin/node” “/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “configure” “ — fallback-to-build” “ — module=/home/testInstallBycrypt/node_modules/bcrypt/lib/binding/bcrypt_lib.node” “ — module_name=bcrypt_lib” “ — module_path=/home/testInstallBycrypt/node_modules/bcrypt/lib/binding” “ — napi_version=3” “ — node_abi_napi=napi” “ — napi_build_version=0” “ — node_napi_label=node-v64”
gyp ERR! cwd /home/testInstallBycrypt/node_modules/bcrypt
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute ‘/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure — fallback-to-build — module=/home/testInsta
Solve this problem with this :