[英]Hyperledger Fabric Fabcar error for enrolladmin.js
I have started the fabric script and after that I run the enrolladmin.js file. 我已经启动了Fabric脚本,然后运行了enrolladmin.js文件。
node enrolladmin.js
but got the following error. 但出现以下错误。 How to resolve it? 怎么解决呢?
node enrollAdmin.js
fs.js:904
return binding.readdir(pathModule._makeLong(path), options.encoding);
^
Error: ENOENT: no such file or directory, scandir '/Users/jaspalsingh/fabric-samples/fabcar/node_modules/grpc/src/node/extension_binary'
at Object.fs.readdirSync (fs.js:904:18)
at Object.<anonymous> (/Users/jaspalsingh/fabric-samples/fabcar/node_modules/grpc/src/grpc_extension.js:37:23)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/jaspalsingh/fabric-samples/fabcar/node_modules/grpc/src/client.js:38:12)
I had the same problem. 我有同样的问题。 just resolved it by these steps: 只需通过以下步骤解决它:
step 2 or 3 - one of them should solve the problem - try in the same order. 第2步或第3步-其中一个应解决问题-按相同顺序尝试。
After step 2 OR step 3 - you should see a file. 在执行完第2步或第3步之后-您应该看到一个文件。 < FABCAR_DIR>/node_modules/grpc/src/node/extension_binary/node-v46-linux-x64-glibc/grpc_node.node <FABCAR_DIR> /node_modules/grpc/src/node/extension_binary/node-v46-linux-x64-glibc/grpc_node.node
After that enroll admin should succeed like: 在那之后,注册管理员应该会像这样成功:
sprint @ fabcar>node enrollAdmin.js
Store path:/home/ravir/hl/fabric-samples/fabcar/hfc-key-store
Successfully enrolled admin user "admin"
Assigned the admin user to the fabric client ::{"name":"admin","mspid":"Org1MSP","roles":null,"affiliation":"","enrollmentSecret":"","enrollment":{"signingIdentity":"42d8536072cf7e47358c137b254d78d8e853934caee70d03dbec06a22f482ad9","identity":{"certificate":"-----BEGIN CERTIFICATE-----\}
if u look closely, the output of startFabric.sh prints 如果您仔细观察,则会显示startFabric.sh的输出
" “
Start by installing required packages run 'npm install'
Then run 'node enrollAdmin.js', then 'node registerUser'
" “
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.