IBM / blockchainbean2

This code pattern shows how to model a supply-chain network using the IBM Blockchain Platform and is based on a collaboration with Brooklyn Roasting Company. The story, along with the supply-chain documents that were used to model this network, can be found at: https://www.ibm.com/blockchainbean. Note that the 'view the blockchain' button is being migrated''
https://developer.ibm.com/patterns/coffee-supply-chain-network-hyperledger-fabric-blockchain-2/
122 stars 84 forks source link

npm install is the answer! run npm install in that directory! #13

Closed ghost closed 5 years ago

ghost commented 5 years ago

npm install is the answer! run npm install in that directory!

Originally posted by @horeaporutiu in https://github.com/IBM/blockchainbean2/issues/10#issuecomment-482732826

I had got below error then I tried npm install in that directory which gave error as well which npm install is working in root directory. Kindly help me.

====================================================== arti@artipc:~/workdir/VSCodeLocalNetwork$ node addIdentity.js module.js:550 throw err; ^

Error: Cannot find module 'fabric-network' at Function.Module._resolveFilename (module.js:548:15) at Function.Module._load (module.js:475:25) at Module.require (module.js:597:17) at require (internal/module.js:11:18) at Object. (/home/arti/workdir/VSCodeLocalNetwork/addIdentity.js:5:47) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3)

==================================

arti@artipc:~/workdir/VSCodeLocalNetwork$ npm install

npm WARN tar ENOENT: no such file or directory, open '/home/arti/workdir/VSCodeLocalNetwork/node_modules/.staging/sjcl-056c9198/test/sha512_test_long_messages.js' npm WARN tar ENOENT: no such file or directory, open '/home/arti/workdir/VSCodeLocalNetwork/node_modules/.staging/sjcl-056c9198/test/cbc_vectors.js' npm WARN tar ENOENT: no such file or directory, open '/home/arti/workdir/VSCodeLocalNetwork/node_modules/.staging/sjcl-056c9198/test/sha512_vectors.js' npm WARN fabricnetwork@1.0.0 No description npm WARN fabricnetwork@1.0.0 No repository field.

npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/har-validator/-/har-validator-5.1.2.tgz npm ERR! 404 npm ERR! 404 'har-validator@5.1.2' is not in the npm registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404 It was specified as a dependency of 'VSCodeLocalNetwork' npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in: npm ERR! /home/arti/.npm/_logs/2019-07-16T18_31_12_401Z-debug.log

ghost commented 5 years ago

I have tried below sequence of command as per one of post on the net and it resolved by problem.

npm update npm install node addIdentity.js

Closing the issue :)