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
I was also having the same problem. The following commands helped me.
npm rebuild
then
npm install bcrypt
I managed to solve this by running the command:
sudo apt-get install -y build-essential python
and then yarn add bcrypt
.
You can find the instructions here:
https://github.com/kelektiv/node.bcrypt.js/wiki/Installation-Instructions
https://github.com/kelektiv/node.bcrypt.js
Running
sudo apt install build-essential
installs all the tools you need to install bcrypt on Linux. Then you can run
npm install
On Mac OS, after a Xcode update, running sudo gcc
and accepting Xcode's new license solved the problem!
Had the same problem. Updating npm and try again (npm install -g npm usually). It fix the issue for me.
If you are on windows run powershell as administrator and use these commands.
npm install --g --production windows-build-tools
and then install bcrypt using
npm install --save bcrypt