Impossible to install bcrypt with npm on EC2


On an Ubuntu Server 14.04 on an Amazon EC2 instance, I had an error when doing npm install. It failed to install bcrypt ("bcrypt": "^0.8.1"in my package.json).

Here’s the error I had:


I just had to install the build tools sudo apt-get install build-essential g++

Note that you have to apt-get update to avoid any problem with apt-get on EC2 (otherwise you might end up with E: Failed to fetch…

Then npm install again and you’re good to go!

Leave a Reply