How to "npm install" bcrypt on Windows 7

I've had the same or at least a similar error. Running the following before trying to install bcrypt solved it for me:

npm install --global --production windows-build-tools

I also faced the same issue today whilst trying to install bcrypt on Windows 10 desktop. Turns out that bcrypt support stable versions of node better check out the docs

The solution for me was:

  1. Upgrade node to a stable version: I manually downloaded and installed Windows installer from Node website.
  2. Install the Windows build tools globally: npm install --global --production windows-build-tools
  3. Finally npm install bcrypt --save

After this everything worked ok.


I would suggest you use bcrypt-nodejs:

https://www.npmjs.com/package/bcrypt-nodejs

It provides almost the same functionality with easy usage.

Original answer:

Can you try the following:

  1. Install Python (http://www.python.org/download/releases/2.7.5/)
  2. Install Visual Studio 2012/13 Express (or other)
  3. Install Windows SDK (for Windows 7 / 8)
  4. Install Win64 OpenSSL v1.0.1g
  5. Open "Developer Command Prompt for VS2012" as Administrator and test install

Then:

  • npm install node-gyp -g
  • npm install bcrypt -g