Hyperledger fabric: enrollAdmin.js Error: Cannot find module 'fabric-client'

0 votes

I am getting this error:

Error: Cannot find module 'fabric-client'
  at Function.Module._resolveFilename (module.js:326:15)
  at Function.Module._load (module.js:277:25)
  at Module.require (module.js:354:17)
  at require (internal/module.js:12:17)
  at Object.<anonymous> (/home/patrick/fabric- 
  at Module._compile (module.js:410:26)
  at Object.Module._extensions..js (module.js:417:10)
  at Module.load (module.js:344:32)
  at Function.Module._load (module.js:301:12)
  at Function.Module.runMain (module.js:442:10)

when I run node enrollAdmin.js. Please help

Nov 21, 2018 in Blockchain by slayer
• 29,040 points

4 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+1 vote
Best answer

Change your directory to fabric-samples/fabrcar. And run:

npm install

This will install the required dependencies. Now run node enrollAdmin.js. It should work

answered Nov 21, 2018 by Omkar
• 66,910 points

selected May 2 by slayer
+1 vote

I'd suggest you first update npm and then install

$ npm update
$ npm install
answered May 2 by Karan
0 votes

What helped me was installing grpc using npm. I used this command:

$ npm install grpc
answered May 2 by Raj
+1 vote
Tried the solution mentioned in the answers but it is not working. I am using windows 7. Any other solutions?
answered May 2 by Suman

On a Windows system, you will require windows build tools. Try the following commands:

$ npm install --global windows-build-tools
$ npm install grpc

Related Questions In Blockchain

+2 votes
4 answers
0 votes
1 answer

Hyperledger fabcar: node enrollAdmin.js error

Update the node: npm rebuild and then run ...READ MORE

answered Oct 26, 2018 in Blockchain by anonymous
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 27,620 points
+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer

Truffle init: Error: Cannot find module 'original-require'

I think you need to run this ...READ MORE

answered Oct 24, 2018 in Blockchain by Omkar
• 66,910 points

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.