Error
npm ERR! code ELIFECYCLE
npm ERR! errno 9009
npm ERR! bcrypt@5.0.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 9009
npm ERR!
npm ERR! Failed at the bcrypt@5.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Solution1
Reason for Error : Node maybe can’t able to find the Python path on your system
step: 1 Rum command prompt as administrator step 2 Install the package
npm install --global --production windows-build-tools
It may take some while, keep patient
step 3 Now install
npm install node-gyp
Last step Now you are ready to Go
npm install bcrypt
Solution2
The easy solution is just switch from the "bcrypt" npm module to bycryptjs
or bcrypt-nodejs
.
It's the exact same API, but pure JS so no native add-ons to deal with.
npm install --save bcryptjs && npm uninstall --save bcrypt
Then change your require
calls to "bcryptjs", but all your code otherwise can be unchanged.