Closed sahirvsahirv closed 6 years ago
Why did you need this change? What was not working without it?
hypledvm@hypledvm-VirtualBox:~/go/src/utilitypoc/application$ node app.js info: [ClientUtils]:
/home/node_modules/grpc/index.js:146 return loadObject(builder.ns, options); ^
TypeError: Cannot read property 'ns' of null
at Object.load (/home/node_modules/grpc/index.js:146:29)
at Object.
Changing the directory here works
Did you follow the instructions in middleware
and install the NPM modules before trying to run the application
? That's a prerequisite mentioned both in the instructions in this repo and in the chapter (where we walk through middleware
before application
.) This sequencing has a particular logic.
FYI, you need to run npm install
in middleware/
. But do sync the latest code though; I fixed dependency versions a few days ago (because the remote repository for the NPM packages got upgraded.)
Probably I did not follow the same steps. But I had to change it to get mine to work.
We can close it if not applicable for all.
On Wed, 8 Aug 2018 at 6:32 PM, VRamakrishna notifications@github.com wrote:
FYI, you need to run npm install in middleware/. But do sync the latest code though; I fixed dependency versions a few days ago (because the remote repository for the NPM packages got upgraded.)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/HyperledgerHandsOn/trade-finance-logistics/issues/31#issuecomment-411397068, or mute the thread https://github.com/notifications/unsubscribe-auth/ATQGk0bSl2A5cgUDG9A0qJGcxlh9MFSBks5uOuFqgaJpZM4VzxTb .
Thanks
On Wed, 8 Aug 2018 at 6:32 PM, VRamakrishna notifications@github.com wrote:
FYI, you need to run npm install in middleware/. But do sync the latest code though; I fixed dependency versions a few days ago (because the remote repository for the NPM packages got upgraded.)
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/HyperledgerHandsOn/trade-finance-logistics/issues/31#issuecomment-411397068, or mute the thread https://github.com/notifications/unsubscribe-auth/ATQGk0bSl2A5cgUDG9A0qJGcxlh9MFSBks5uOuFqgaJpZM4VzxTb .
In this instance, you were missing dependencies, which you could identify from the exception stack. That ought to have been a clue that you missed (or skipped) a step or two in the instructions.
Let me reiterate that the book (or this code repo) is not meant to be a primer in Go or JavaScript programming (though you get some more lessons in the Composer chapters for the languages used there.) If you are not handy with these languages, you need to be extra careful in following instructions while learning something in the process.
Lastly, though I'd like to be helpful, especially to our book customers, I'm afraid I can't be addressing issues at this rate. I (like all the authors of this book) have a day job that keeps me busy. Maintaining this code base is strictly a side project for me.
So I'd encourage you to learn from the book and especially understand the rationale behind the steps performed. That'll help you sort out issues.
Of course, if you do find a real problem with the code or the instructions, file a bug report and we'll try to address it ASAP. But make sure you've exhausted your options first.
Thanks, and good luck!
Thanks so much. I get that. We need proficiency in node and GO to and docker to start with.
I am new to all the three and it has taught me quite a lot.
I have left office. Will update soon.
Thanks
On Wed, 8 Aug 2018 at 6:51 PM, VRamakrishna notifications@github.com wrote:
- Please confirm that what I suggested worked, and then close the issue.
- If you didn't follow the instructions in sequence as specified, clearly you are bound to hit a problem or two somewhere. It's always possible to hack your way out of it, as you did, but that can't be something we can prescribe for others.
In this instance, you were missing dependencies, which you could identify from the exception stack. That ought to have been a clue that you missed (or skipped) a step or two in the instructions.
Let me reiterate that the book (or this code repo) is not meant to be a primer in Go or JavaScript programming (though you get some more lessons in the Composer chapters for the languages used there.) If you are not handy with these languages, you need to be extra careful in following instructions while learning something in the process.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/HyperledgerHandsOn/trade-finance-logistics/issues/31#issuecomment-411403012, or mute the thread https://github.com/notifications/unsubscribe-auth/ATQGkznlWlTawFGzckt1RvYJWH0KsdX1ks5uOuXxgaJpZM4VzxTb .
The other two that I had posted today, I had already solved by working my way through.
I just posted it thinking that it might help others in the process not because there was a bug in the book or code.
Probably it was the wrong forum. Sorry for that.
Thanks so much. Gowri
On Wed, 8 Aug 2018 at 6:57 PM, VRamakrishna notifications@github.com wrote:
Lastly, though I'd like to be helpful, especially to our book customers, I'm afraid I can't be addressing issues at this rate. I (like all the authors of this book) have a day job that keeps me busy. Maintaining this code base is strictly a side project for me.
So I'd encourage you to learn from the book and especially understand the rationale behind the steps performed. That'll help you sort out issues.
Of course, if you do find a real problem with the code or the instructions, file a bug report and we'll try to address it ASAP. But make sure you've exhausted your options first.
Thanks, and good luck!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/HyperledgerHandsOn/trade-finance-logistics/issues/31#issuecomment-411404685, or mute the thread https://github.com/notifications/unsubscribe-auth/ATQGkz4IxjDHMK0TLNctcg4k_yu1jBINks5uOucvgaJpZM4VzxTb .
Not a problem. Even if you encounter issues with adaptations to other apps and other network structures because of inadequacies in our instructions, it's useful to bring them to our attention. But do note that we'll get to work on them on a best-effort basis.
I had to change it to
_commonProto = grpc.load(path.join(dirname, '../application/node_modules/fabric-client/lib/protos/common/common.proto')).common; var _configtxProto = grpc.load(path.join(dirname,
to make it work. Please consider it if it is valid for all. Thanks