Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/n

今天在跑fabric官方demo blockchain: 区块链底层技术的研究和尝试,ETH智能合约,DAPP,IPFS,超级账本,联盟链Hyperledger Fabric - Gitee.com

时报了一个错误。

我先启动下网络

./startFabric.sh

然后更新依赖

npm install

 就报了下面的错误:

 node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v64-linux-x64-glibc.tar.gz
   node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
   node-pre-gyp ERR! Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
   node-pre-gyp ERR! Hit error Connection closed while downloading tarball file

 这个报错找了整整一下午和一整个晚上,再忍受着实验室没空调还被蚊子咬的情况下,我尝试个各种方法,注意到了[email protected],知道了是grpc的版本与我的nodejs版本不兼容,版本太低,折腾了大半天去升级grpc版本,也没升级成功。

最后!反其道而行之!

既然两个版本不兼容,我不如去降低nodejs的版本,把它的版本降低到8

用了

sudo n

来切换我的node版本,到8

之后再下载依赖 npm install就不报错了

 

 然后注册管理员和用户

node enrollAdmin.js
node registerUser.js

 最后运行程序

node index.js

 跑通!

虽然弹出了 未查询到ID的弹窗错误,但也总算跑通了!

回去睡觉!

猜你喜欢

转载自blog.csdn.net/weixin_57534018/article/details/125054320
403