简体   繁体   English

enrolladmin.js的Hyperledger Fabric Fabcar错误

[英]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: 只需通过以下步骤解决它:

  1. Create directory : < FABCAR_DIR>/node_modules/grpc/src/node/extension_binary/ 创建目录:<FABCAR_DIR> / node_modules / grpc / src / node / extension_binary /
  2. Do "npm install" in < FABCAR_DIR> 在<FABCAR_DIR>中执行“ npm install”
  3. Do "npm rebuild" in < FABCAR_DIR> 在<FABCAR_DIR>中执行“ npm rebuild”

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.

相关问题 在执行enrollAdmin.js 时遇到错误“FileSystemWallet 不是构造函数” - facing error “FileSystemWallet is not a constructor” while executing enrollAdmin.js Hyperledger Fabric - Fabcar 性能 - Hyperledger Fabric - Fabcar performance FabCar Hyperledger Fabric ./startFabric.sh 执行不完全正常 - FabCar Hyperledger Fabric ./startFabric.sh execution is not completely working 无法找到在 Fabcar 示例中注册管理员所需的模块 - Hyperledger Fabric - Unable to find modules required to enroll admin in Fabcar example - Hyperledger fabric 在结构1.3的节点中实例化fabcar链码时出错 - Error in instantiating fabcar chaincode in node, fabric 1.3 使用Hyperledger Fabric Node JS创建频道时出错 - Error when Creating Channel Using Hyperledger Fabric Node JS 在超级账本结构中使用节点 js sdk 时出错? - Error while using node js sdk in hyperledger fabric? Hyperledger Fabric v2.1:网关连接选项中 asLocalhost 设置为 false 的 Fabcar - Hyperledger Fabric v2.1: Fabcar with asLocalhost set to false in Gateway connection options Hyperledger Fabric Node.js Sdk 出现错误:访问被拒绝 - Hyperledger Fabric Node.js Sdk got error :access denied 使用 Node.js 在 Hyperledger Fabric 中创建通道时出错 - Error in Channel Creation in Hyperledger Fabric using Node.js
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM