I\'m unable to install bcrypt using npm
on my machine because I encounter the following errors. I have been troubleshooting the issue without much luck. Can you
On this command:
npm install --g --production windows-build-tools
You may have to run this in Powershell as administrator on your Windows machine.
You do that by right-clicking on Powershell and select "Run As Administrator"
Reason for Error : Node maybe can’t able to find the Python path on your system
Solution
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
Upgrade to bcrypt@5.0.0
npm i bcrypt@5.0.0
I am not getting errors on this newer version of bcrypt, older version gave different types of errors ranging from not able to install bcrypt to typescript type errors
I just ran the following then tried the install and it worked:
npm install node-pre-gyp -g
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.
Long term, I suspect at the moment bcrypt may not be ready for node v0.12.0 yet, but if not it will eventually be updated and ready.