[英]BCrypt on WebFaction Node.Js doesn't install
我的Node.Js應用程序依賴於bcrypt。 它在我的本地服務器上運行良好,但是當我關閉WebFaction服務器的存儲庫時 ,bcrypt似乎不想在那里安裝(或編譯?)。
我都嘗試過npm install
(在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
我還嘗試在運行npm -g的服務器上安裝新版本的node-gyp -g install node-gyp
但這沒有用。
支持沒有響應。
我請你幫忙。
謝謝!
好的,因為沒人能找到解決方案,所以我自己發表一個帖子:在我看來,最好的方案是安裝另一個模塊: bcrypt-nodejs 。
唯一的問題是它比bcrypt慢大約3倍( 請參閱此處的基准測試 ),但是由於我僅將其用於登錄和注冊,因此對我來說仍然很好。
關於我的bcrypt問題,實際上是該軟件包的問題,這里有一些可能的解決方案: https : //github.com/ncb000gt/node.bcrypt.js/issues/90 。
另一個解決方案是嘗試在不使用npm的情況下構建軟件包:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.