简体   繁体   English

未安装WebFaction Node.Js上的BCrypt

[英]BCrypt on WebFaction Node.Js doesn't install

my Node.Js app has a dependency on bcrypt. 我的Node.Js应用程序依赖于bcrypt。 It works fine on my local server, but when I closed the repository to WebFaction servers, bcrypt doesn't seem to want to install (or compile?) there. 它在我的本地服务器上运行良好,但是当我关闭WebFaction服务器的存储库时 ,bcrypt似乎不想在那里安装(或编译?)。

I tried both npm install 我都尝试过npm install

(it's listed in packages.json dependencies) and also (在packages.json依赖项中列出),以及

npm install bcrypt

But none of this worked and I'm getting the following kind of error: 但这一切都不起作用,并且出现以下错误:

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

I also tried to install a new version of node-gyp on the server running npm -g install node-gyp 我还尝试在运行npm -g的服务器上安装新版本的node-gyp -g install node-gyp

But it didn't work. 但这没有用。

Support is not responding. 支持没有响应。

I ask for your help. 我请你帮忙。

Thank you! 谢谢!

Ok, so as nobody had the solution, I'll post one myself: the best scenario in my case was to install another module: bcrypt-nodejs . 好的,因为没人能找到解决方案,所以我自己发表一个帖子:在我看来,最好的方案是安装另一个模块: bcrypt-nodejs

The only problem with it is that it's about 3 times slower than bcrypt ( see benchmarks here ) but as I only used it for login and registration, it's still fine for me. 唯一的问题是它比bcrypt慢大约3倍( 请参阅此处的基准测试 ),但是由于我仅将其用于登录和注册,因此对我来说仍然很好。

Regarding my problem with bcrypt, it's actually a problem with the package, some possible solutions are here: https://github.com/ncb000gt/node.bcrypt.js/issues/90 . 关于我的bcrypt问题,实际上是该软件包的问题,​​这里有一些可能的解决方案: https : //github.com/ncb000gt/node.bcrypt.js/issues/90

Another solution is to try building the package without npm: 另一个解决方案是尝试在不使用npm的情况下构建软件包:

Cannot install bcrypt node.js module on Centos Server 无法在Centos服务器上安装bcrypt node.js模块

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM