Error: Cannot find module 'fabric-client/lib/EventHub.js' 部署fabric-explorer时

~/go/src/github.com/hyperledger/fabric-explorer# ./start.sh 
module.js:550
    throw err;
    ^

Error: Cannot find module 'fabric-client/lib/EventHub.js'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/root/go/src/github.com/hyperledger/fabric-explorer/service/fabricservice.js:7:16)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)

这是因为在fabric1.2.0以后已经不在支持EventHub.js了, 需要用ChannelEventHub 来代替 , 但是我肯定不能改它的源码 . 只需要把依赖换成1.0.5就可以了 , 

1 把下载好的fabric-client和fabric-ca-client从node_modules里面删除, (注意路径的对照哦,我当前是在浏览器的根目录,)

rm -rf ./node_modules/fabric-ca-client/
rm -rf ./node_modules/fabric-client/

2下载1.0.5的fabric-client和fabric-ca-client

npm install fabric-client@1.0.5
npm install fabric-ca-client@1.0.5

再次启动 , ./start.sh 问题解决

06-07 17:31:32.205 995 1244 I EventHub: Removing device Dangbei Consumer Control due to epoll hang-up event. 06-07 17:31:32.205 995 1244 I EventHub: Removed device: path=/dev/input/event3 name=Dangbei Consumer Control id=5 fd=263 classes=0x521 06-07 17:31:32.215 995 2470 I AlarmManager: Change Wakeup Alarm type to non Wakeup type, current type=[3] packageName = com.google.android.gmsstatsTag = *alarm*:com.google.android.chimera.container.IntentOperationService.SAVED_INTENT @315360469531 and next wakeup alarm is @Wed Jun 07 23:23:42 EDT 2023 06-07 17:31:32.215 995 1786 I AlarmManager: Change Wakeup Alarm type to non Wakeup type, current type=[3] packageName = com.google.android.gmsstatsTag = *alarm*:com.google.android.chimera.container.IntentOperationService.SAVED_INTENT @315360469531 and next wakeup alarm is @Wed Jun 07 23:23:42 EDT 2023 06-07 17:31:32.220 995 1244 I InputReader: Device removed: id=6, eventHubId=5, name='Dangbei Consumer Control', descriptor='f074d74f3460383cc18a1f861ffe199c20c3c49b', sources=0x81002313 06-07 17:31:32.221 995 1244 I EventHub: Removing device '/dev/input/event3' due to inotify event 06-07 17:31:32.224 995 1244 I EventHub: Removing device '/dev/input/mouse0' due to inotify event 06-07 17:31:32.245 995 1244 I EventHub: Removing device Dangbei Mouse due to epoll hang-up event. 06-07 17:31:32.245 995 1244 I EventHub: Removed device: path=/dev/input/event4 name=Dangbei Mouse id=6 fd=265 classes=0x408 msg_convert_update_ap_status_to_ex_am: resumed, navigator 06-07 17:31:32.261 995 1244 I InputReader: Device removed: id=6, eventHubId=6, name='Dangbei Consumer Control', descriptor='f074d74f3460383cc18a1f861ffe199c20c3c49b', sources=0x80002103 06-07 17:31:32.263 995 1244 I EventHub: Removing device '/dev/input/event4' due to inotify event <vendor/mediatek/tv/alita/tvapi/dev/menu2/menu.c:97:_menu_app_process_msg_fct> 06-07 17:31:32.264 995 1244 I EventHub: Removing device '/dev/input/event5' due to inotify event
最新发布
06-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值