无法在Azure上部署node.js项目,Bcrypt是罪魁祸首

Whi*_*rly 6 azure bcrypt node.js

我目前正在开发一个部署在Azure上的node.js项目.我刚刚使用bcrypt添加了密码加密.在我的测试计算机上一切都很好但是当我在Azure上部署时,部署失败了,我收到了这条消息:

node-gyp rebuild
C:\DWASFiles\Sites\invata\VirtualDirectory0\site\wwwroot\node_modules\bcrypt>node  "D:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-   gyp\bin\node-gyp.js" rebuild 
gypnpm ERR! bcrypt@0.7.6 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
An error has occurred during web site deployment.
npm ERR! 
npm ERR! Failed at the bcrypt@0.7.6 install script.
Run Code Online (Sandbox Code Playgroud)

BCrypt安装有点棘手,因为它需要下载和安装openSSL.那么有可能在azure上部署这样的模块还是没有希望?

谢谢,Stéphane

Whi*_*rly 14

经过一番调查后,我遇到了另一个bcrypt模块,这个模块是一个原生的JS模块,它在Azure上完美运行:https://github.com/shaneGirish/bcrypt-nodejs