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:
- Upgrade node to a stable version: I manually downloaded and installed Windows installer from Node website.
- Install the Windows build tools globally:
npm install --global --production windows-build-tools
- 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:
- Install Python (http://www.python.org/download/releases/2.7.5/)
- Install Visual Studio 2012/13 Express (or other)
- Install Windows SDK (for Windows 7 / 8)
- Install Win64 OpenSSL v1.0.1g
- Open "Developer Command Prompt for VS2012" as Administrator and test install
Then:
npm install node-gyp -g
npm install bcrypt -g