How to perform hashing in authentication because Bcrypt is deprecated?

I tried to install bcrypt using npm.
npm install bcrypt
but it is throwing the error

npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated npmlog@5.0.1: This package is no longer supported.
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.
npm warn deprecated gauge@3.0.2: This package is no longer supported.
npm error code 1
npm error path D:\Backend-Development\Shreiyans_Coding\12. Authentication & Authorization\node_modules\bcrypt
npm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm error 'Authorization\node_modules.bin' is not recognized as an internal or external command,
npm error operable program or batch file.
npm error node:internal/modules/cjs/loader:1148
npm error throw err;
npm error ^
npm error
npm error Error: Cannot find module ‘D:\Backend-Development\Shreiyans_Coding@mapbox\node-pre-gyp\bin\node-pre-gyp’
npm error at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
npm error at Module._load (node:internal/modules/cjs/loader:986:27)
npm error at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
npm error at node:internal/main/run_main_module:28:49 {
npm error code: ‘MODULE_NOT_FOUND’,
npm error requireStack:
npm error }
npm error
npm error Node.js v20.15.1
npm error A complete log of this run can be found in: C:\Users\as879\AppData\Local\npm-cache_logs\2024-09-23T04_17_20_283Z-debug-0.log

Remove the & from the path/folder name.

The initial deprecation warnings are out of your control and doesn’t affect your ability to install bcrypt.

I figured out that bcrypt is deprecated and we should use bcryptjs rather.

I don’t know why you think bcrypt it is deprecated, but it isn’t. The latest release of bcrypt is from Aug 4, 2023.

I haven’t use bcryptjs but its latest release is from Jan 4, 2017. Not that it necessarily matters much if the lib is stable and doesn’t have unfixed issues.