[英]How to install bcrypt nodejs module in window 7 32-version
[英]How to install bcrypt for nodejs on Openshift?
使用https://github.com/icflorescu/openshift-cartridge-nodejs獲取節點的最新版本,我運行了npm install
並得到以下錯誤:
npm ERR! Linux 2.6.32-573.12.1.el6.x86_64
npm ERR! argv "/var/lib/openshift/56c8cd172d527182dd0000e7/app-root/data/.nodejs/bin/node" "/var/lib/openshift/56c8cd172d527182dd0000e7/app-root/data/.nodejs/bin/npm" "install"
npm ERR! node v5.6.0
npm ERR! npm v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! bcrypt@0.8.5 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.8.5 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs bcrypt
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /var/lib/openshift/56c8cd172d527182dd0000e7/app-root/runtime/repo/src/bookmap/npm-debug.log
我已經嘗試在package.json
顯式列出node-gyp
作為依賴項,這會導致相同的錯誤。 這是我當前來自package.json
依賴項:
"dependencies": {
"angular": "^1.4.8",
"angular-datepicker": "~1.0.5",
"angular-route": "^1.4.8",
"angular-simple-logger": "^0.1.7",
"angular-ui-bootstrap": "^0.14.3",
"node-gyp": "",
"bcrypt": "^0.8.5",
"body-parser": "^1.14.1",
"bootstrap": "^3.3.6",
"bower": "^1.3.9",
"express": "^4.13.3",
"gulp": "^3.8.7",
"gulp-connect": "^2.0.6",
"jwt-simple": "^0.4.0",
"leaflet": "^0.7.7",
"lodash": "^3.10.1",
"path": "^0.12.7",
"pg": "^4.4.3",
"ui-leaflet": "^1.0.0",
"winston": "^2.1.1"
}
node-gyp可以與npm install node-gyp
。
我建議使用bcrypt的javascript版本,這樣您就不必在openshift上構建它。 我們在openshift上使用bcrypt-nodejs,並且效果很好https://www.npmjs.com/package/bcrypt-nodejs
您只需要將其放在package.json中的依賴項下即可。 這是我們所擁有的,但是您可以檢查並獲取最新版本:
"bcrypt-nodejs": ">=0.0.3",
bcrypt-nodejs在openshift中不起作用。 使用此https://www.npmjs.com/package/bcryptjs
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.