hyperledger-fabric-basics icon indicating copy to clipboard operation
hyperledger-fabric-basics copied to clipboard

node crowd_fund_demo.js .... Error: Cannot find module 'hfc'

Open djc2k opened this issue 7 years ago • 6 comments

When executing the node crowd_fund_demo.js ... command, got the following error:

Error: Cannot find module 'hfc'

djc2k avatar May 09 '17 00:05 djc2k

npm install <- should fix that

bancey avatar May 12 '17 12:05 bancey

No luck: here's the output of attempting to install hfc after updating npm: https://gist.github.com/alwillis/e9a319ea195f01936197225ffaa6402b

alwillis avatar May 20 '17 16:05 alwillis

After 'npm install hfc' I got same about: express, body-parser, debug.

raderio avatar Jun 03 '17 13:06 raderio

I am having this same problem, hfc is not found and npm install hfc is failing. Any help out there?

npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/xxx/.npm/_logs/2017-08-23T22_21_54_935Z-debug.log
node crowd_fund_demo.js 192.168.99.100 single-peer
module.js:472
    throw err;
    ^

Error: Cannot find module 'hfc'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/xxx/Desktop/workspace/hyperledger-fabric-basics/crowd_fund_demo.js:2:11)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

bennythejudge avatar Aug 23 '17 22:08 bennythejudge

@raderio Just install this npm package, and then run it from the project directory, it will download all missing dependecies.

gamebusterz avatar Aug 31 '17 13:08 gamebusterz

@raderio running just npm install with no package name after will fetch all of the packages listed in package.json. Since as you ran npm install hfc only that specific package was installed.

bancey avatar Sep 01 '17 07:09 bancey