【问题标题】:BCrypt on WebFaction Node.Js doesn't installWebFaction Node.Js 上的 BCrypt 未安装
【发布时间】:2014-04-17 06:46:57
【问题描述】:

我的 Node.Js 应用程序依赖于 bcrypt。它在我的本地服务器上运行良好,但是当我将 repository 关闭到 WebFaction 服务器时,bcrypt 似乎不想在那里安装(或编译?)。

我都试过了 npm 安装

(它在 packages.json 依赖项中列出)以及

npm install bcrypt

但这些都不起作用,我收到以下错误:

make: Entering directory 
`/home/noduslabs/webapps/infranodus/infranodus/node_modules/bcrypt/build'  
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
../src/bcrypt_node.cc: In function ‘v8::Handle<v8::Value><unnamed>::GenerateSalt(const         
v8::Arguments&)’:
../src/bcrypt_node.cc:257: error: invalid conversion from ‘void (*)(uv_work_t*)’ to ‘void     
(*)(uv_work_t*, int)’

[...]

make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
make: Leaving directory     
`/home/noduslabs/webapps/infranodus/infranodus/node_modules/bcrypt/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2

我还尝试在运行的服务器上安装新版本的 node-gyp npm -g install node-gyp

但是没有用。

支持没有响应。

我请求你的帮助。

谢谢!

【问题讨论】:

标签: node.js bcrypt webfaction node-gyp


【解决方案1】:

好的,既然没有人有解决方案,我会自己发布一个:在我的情况下,最好的方案是安装另一个模块:bcrypt-nodejs

它唯一的问题是它比 bcrypt (see benchmarks here) 慢了大约 3 倍,但由于我只将它用于登录和注册,它对我来说仍然没问题。

关于我的bcrypt问题,实际上是包的问题,​​一些可能的解决方案在这里:https://github.com/ncb000gt/node.bcrypt.js/issues/90

另一种解决方案是尝试在没有 npm 的情况下构建包:

Cannot install bcrypt node.js module on Centos Server

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-05-07
    • 1970-01-01
    • 1970-01-01
    • 2013-09-12
    • 2012-04-26
    • 1970-01-01
    • 1970-01-01
    • 2011-04-27
    相关资源
    最近更新 更多