命令
npm install bcrypt
输出问题
> bcrypt@4.0.0 install G:\00立项报告\Y20002 APP\server\node_modules\bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for bcrypt@4.0.0 and node@10.19.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error read ECONNRESET
.......
尝试以下办法无法解决
1、安装npm install-g node-gyp无效
2、安装Python和(C++环境)无效
3、降级nodejs无效
解决办法
使用bcryptjs替换bcrypt,
安装方法 npm i bcryptjs
使用require('bcryptjs')
网友评论