为什么NPM安装bcrypt失败

我想使用bcrypt进行salt和散列,当我使用NPM来尝试安装时出现以下错误。

gyp ERR! configure error gyp ERR! stack error spawn ENOENT gyp ERR! stack at errnoException <child_process.js:1001:11> gyp ERR! stack at process.childProcess._handle.oneexit<child_process.js.792:34> gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "node" "c:\program files\nodejs\\node_modules\\npm\\node_modules\\node- gyp\\bin\\node-gyp.js" gyp ERR! cwd C:\Users\jfdfdf\desktop\tntw_wip\API\node_modules\bcrypt gyp ERR! node -vv 0.10.33 gyp ERR! node-gyp -v v1.0.1 gyp ERR! not ok gyp ERR! bcrypt 0.8.0.33 gyp ERR! Exit status 1 gyp ERR! gyp ERR! Failed at the bcrypt install gyp ERR! this is most likely a problem with the bcrypt package gyp ERR! not with npm itself gyp ERR! tell the author that this fails on your system gyp ERR! node-gyp rebuild gyp ERR! you can get their info via; gyp ERR! npm owner is bcrypt gyp ERR! there is likely additional loggin info above gyp ERR! system Windows_NT 6.1.7601 gyp ERR! command "C:\\Program files\\node.js\\\\node.exe" "C:\\program files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "bcrypt" gyp ERR! cwd C:\users\jfdfdf\Desktop\tntw_wip\API gyp ERR! node -v v0.10.33 gyp ERR! npm -v 1.4.28 gyp ERR! code ELIFECYCLE 

我安装了python,安装了gyp,当前版本的节点和npm,打开ssl,C ++和需要的SDK。 我正在钻入项目的API文件夹并使用右键单击打开我的命令窗口来完成所有安装。 我正在使用的环境是Windows 7的专业,我正在括号。

我已经在堆栈和bcrypt页面上search并跟踪了这个问题的几个解决scheme,没有任何工作。 我是新的节点,而不是使用NPM来安装的东西,所以任何帮助,将不胜感激。

如果你在本地安装bcrypt ,然后简单地上传你的整个代码库(包括你的node_modules文件夹),那么操作系统和你的gyp和/或bcrypt版本可能会node_modules

如果您还没有这样做,请尝试从您的repo中排除任何节点模块,并在服务器上为每个部署运行npm install ,这会根据主机操作系统自动提取正确的依赖关系。