【发布时间】:2018-07-24 10:42:05
【问题描述】:
我已经安装了所有先决条件,但在 npm 安装后注册节点管理员时出现以下错误。如果有人可以帮助我解决错误:-
hitesh@hitesh-VirtualBox:~/medication-blockchain/drug-app$ node registerAdmin.js
/home/hitesh/medication-blockchain/drug-app/node_modules/fabric-client/node_modules/grpc/src/grpc_extension.js:57
throw e;
^
Error: Cannot find module '/home/hitesh/medication-blockchain/drug-app/node_modules/fabric-client/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
at Function.Module._load (internal/modules/cjs/loader.js:507:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object.<anonymous> (/home/hitesh/medication-blockchain/drug-app/node_modules/fabric-client/node_modules/grpc/src/grpc_extension.js:32:13)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
【问题讨论】:
-
请注意,我已经完成了“npm install”、“npm rebuild”所有操作。它不工作。版本如前所述“- npm version= 6.2.0, nodejs version= v10.7.0
-
你可以尝试使用 Node v8 而不是 Node v10 吗?
-
但我担心回溯版本会影响许多配置文件,对吧? @GariSingh
-
fabric-client 目前不支持 Node 10 ...它只支持 Node 8。所以您需要删除“node_modules”文件夹,切换到 Node v8,然后运行“npm再次安装”
-
好的,很好。那么具体的步骤是什么,比如删除 node_modules?然后直接安装node v8? @GariSingh 设置路径还是什么?
标签: npm hyperledger-fabric npm-install blockchain grpc