Error: Cannot find module 'fabric-client/lib/EventHub.js'fabric-explorer를 배치할 때
1172 단어 오보 기록
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. (/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)
fabric 1.2.0 이후 EventHub를 지원하지 않기 때문입니다.js입니다. Channel EventHub로 대체해야 하지만, 원본 코드를 바꿀 수 없습니다.의존을 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 [email protected]
npm install [email protected]
다시 시작,./start.sh 문제 해결