bcrypt not installing when tried to using npm i bcrypt

212 views Asked by At

I am getting error Cannot find module 'bcrypt' in nodejs application

I have tried to install it using npm install bcrypt but still getting the issue

npm i bcrypt

enter image description here

1

There are 1 answers

0
sdgluck On BEST ANSWER

It is trying to build bcrypt from source, but you don't have the necessary tools installed for it to do so.

Try installing the Visual C++ Build Tools first, which can be done using the following convenience npm package:

npm install -g windows-build-tools

Once that is complete, run npm install bcrypt again.

More info here: https://www.npmjs.com/package/windows-build-tools