I am getting error Cannot find module \'bcrypt\' in nodejs application
I have tried to install it using npm install bcrypt but still gett
You have to install bcryptjs. Use npm install bcryptjs --save It worked for me when I was stuck here.
The solution for me was to npm rebuild.
This worked for me.
1) Delete any bcrypt folder in nodemodules folder, folder may have been created due to your repeated tries.
(C:\Program Files\nodejs\node_modules\npm\node_modules)
2) run this code npm install --save bcryptjs
e.g -
C:\Projects\loginapp>npm install --save bcryptjs
I'm using bcrypt with typescript
npm i --save @types/bcryptjs
Helped me solve the error above.
If none of these examples didn't work, you should try to downgrade Node version installed:
E.g from Node version 10 to version 9
npm install node@<version of node>
It should be npm install bcrypt --save. Works for me!
And, if you have others issues after install it, you can check your packages with npm-check.