You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
node_modules\bcrypt\lib\binding\bcrypt_lib.node is not a valid Win32 application. #112
I installed bcrypt in my local machine and it is working fine. But when I deployed the files in the Microsoft Azure I am getting the following error
Application has thrown an uncaught exception and is terminated:
Error: \?\D:\home\site\wwwroot\node_modules\bcrypt\lib\binding\bcrypt_lib.node is not a valid Win32 application.
\?\D:\home\site\wwwroot\node_modules\bcrypt\lib\binding\bcrypt_lib.node
at Object.Module._extensions..node (internal/modules/cjs/loader.js:717:18)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (D:\home\site\wwwroot\node_modules\bcrypt\bcrypt.js:6:16)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
Is there any separate brcypt package available to install with 32-bit node?
I am trying to upgrade it to 64-bit node in Microsoft Azure. But no luck so far. So I decided to try install bcypt package for 32-bit node. Could someone help me with this?
for anyone having this error, just change const bcrypt = require("bcrypt"); for const bcrypt = require("bcryptjs");
and npm i bcryptjs --save
Reacted by Mauricio, George-Guo-tech, Liam Ghaziri, Giovani, Krithikamanoharan, Skye Lucking, moullfe3laa, Watcharapong Kaewphila, Shajin KP, Ricardo Reis and 10 more
Activity
dcodeIO commentedon Dec 20, 2019
bcrypt is a native package, while bcryptjs (this package) is pure JS and should work everywhere.
siddiqlm commentedon Jan 8, 2020
bcryptjs is working great. Thank you so much @dcodeIO .
NutonC commentedon Apr 21, 2020
how solved brother ....i still not solved
siddiqlm commentedon Apr 22, 2020
I used 'bcryptjs' module instead of 'bcrypt' module. It just worked fine. What error you are getting?
edelmacias commentedon Jun 4, 2020
for anyone having this error, just change
const bcrypt = require("bcrypt");forconst bcrypt = require("bcryptjs");and npm i bcryptjs --save
hallonmunken commentedon Aug 11, 2020
Thank you @edelmacias
shajin-sha commentedon Aug 24, 2021
Thank you @edelmacias
gideao-domingos commentedon Sep 5, 2021
Install
node-gyp package globally
npm i -g node-gyp
and then retry
npm i bcrypt
in my case its work