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- 
samples/fabcar/enrollAdmin.js:11:21)
  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,370 points
5,211 views

4 answers to this question.

+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
• 69,220 points

selected May 2, 2019 by slayer
+1 vote

I'd suggest you first update npm and then install

$ npm update
$ npm install
answered May 2, 2019 by Karan
npm update 

npm install -g npm

Worked :)

0 votes

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

$ npm install grpc
answered May 2, 2019 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, 2019 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

+1 vote
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
1,278 views
0 votes
1 answer
0 votes
2 answers
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,445 views
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
• 26,740 points
992 views
+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
• 69,220 points
1,914 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP