I am getting error Cannot find module \'bcrypt\' in nodejs application
I have tried to install it using npm install bcrypt but still gett
Solution 1: lengthy method is : Install all dependencies first.
npm install -g windows-build-tools, npm install -g node-gyp
then, install bcrypt : npm install bcrypt
Solution 2: easy method. No dependencies installation required.
npm install bcryptjs
...You might have installed bcrypt but it seems like the installation was not successful for some reason. check the package.json file. If you cannot find bcrypt, the installtion was unsuccessful. You have to install again.
As everyone explained, it because of lack dependencies that your installation was unsuccessful. You can checkout the required dependencies in the link: https://www.npmjs.com/package/bcrypt
Note: To use bcrypt: var bcrypt = require('bcrypt'); .....
to use bcryptjs. var bcrypt = require('bcryptjs');
for reference: https://www.npmjs.com/package/bcrypt https://www.npmjs.com/package/bcryptjs