nodejs mediator install error

27 views
Skip to first unread message

Sorcerer Stone

unread,
Feb 26, 2016, 12:37:05 AM2/26/16
to OpenHIM-Implementers
Hello Ryan,
I ran into problems installing mediator. I installed grunt because section 3.4 ( Message adaption using a mediator) requires me to run a grunt task.
When I ran "grunt server", I received the following error messages.

>> Local Npm module "grunt-contrib-watch" not found. Is it installed?
>> Local Npm module "grunt-parallel" not found. Is it installed?

And then the following error was issued:

Running "express-server:custom" (express-server) task
Fatal error: Server ["...\openhim-console-1.4.1\tutorialmediator\build\index"] -  SyntaxError: Unexpected end of input

Q1/ Should "grunt-contrib-watch" & "grunt-parallel" modules be part of grunt install or it is from a different package? I had updated nodejs after I installed Grunt. So these missing modules messages are weird.
Q2/ Is the above fatal error related to the missing modules?

Thanks in advance.

Sorcerer Stone

unread,
Feb 28, 2016, 3:32:25 PM2/28/16
to OpenHIM-Implementers
Hello All,
I am still stuck at this error when I tried to run "grunt serve"

Fatal error: Server ["..\openhim-console-1.4.1\tutorialmediator\build\index"] -  SyntaxError: Unexpected end of input

Even if I ignored the prompts regarding missing modules for "grunt-contrib-watch" & "grunt-parallel" (in my previous post), it seems to me problem resides within this index.js file.

I have uninstall and reinstall various node, grunt, yeoman modules for the past few days, to get rid of the missing modules warnings, same result.

Has any one build this latest mediator module from scratch successfully? Would you like to share your thoughts how I can over come this issue?

Thanks.
PS. I attached index.js from "..\openhim-console-1.4.1\tutorialmediator\build\" folder for your reference.
index.js

Ryan Crichton

unread,
Mar 2, 2016, 5:25:28 AM3/2/16
to Sorcerer Stone, OpenHIM-Implementers
Hi,


It should set things up for you. What do your package.json file and gruntfile look like? Also, please note the command is 'grunt serve' not 'grunt server'.

Cheers,
Ryan

--
You received this message because you are subscribed to the Google Groups "OpenHIM-Implementers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhim-implemen...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Ryan Crichton
Lead Developer, Jembi Health Systems  SOUTH AFRICA
Mobile: +27845829934 | Skype: ryan.graham.crichton
E-mail: ry...@jembi.org

Martin Brocker

unread,
Mar 4, 2016, 1:09:47 AM3/4/16
to OpenHIM-Implementers
Hi 

Have you managed to get the OpenHIM successfully installed and running or do you still require some implementation help. I can try and assist you in getting it up and running if you are still experiencing issue. 

Warm Regards,
Martin

Sorcerer Stone

unread,
Mar 12, 2016, 2:34:35 PM3/12/16
to OpenHIM-Implementers
Hello Martin,
I think I narrowed down my current problem of not able to setup mediator correctly to the file "index.js"
I followed Ryan's link to: http://openhim.readthedocs.org/en/latest/tutorial/4-message-adaption-using-a-mediator.html#nodejs-mediator
I examined the pdf file (R1.3.0) from Jan of this year.
The content is different in on P24 of the above pdf and that from the URL link. I had been following the pdf's instructions & I got stuck.
Can you email me a working copy of the index.js file? I am running into problems with this file.
Thanks in advance.
Sorcerer

Martin Brocker

unread,
Mar 14, 2016, 5:32:55 AM3/14/16
to Sorcerer Stone, OpenHIM-Implementers
Hi Sorcerer

I have attached a working index.js file which i created/tested the Message Adaption mediator. If you can maybe just confirm that you have below setup:
If you have all the above setup correctly you should just be able to replace the index.js file with the one attached. You might have to do a npm install to get the needle package that gets used in the updated script.

Let me know if you are still experiencing any issues getting the mediator working.

Warm Regards,
Martin
 

--
You received this message because you are subscribed to the Google Groups "OpenHIM-Implementers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openhim-implemen...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Martin Brocker
Software Developer
Jembi Health Systems NPC | SOUTH AFRICA
Office: +27 21 701 0939 | Skype: martin.brocker

E-MAIL DISCLAIMER:

This e-mail contains proprietary and confidential information some or all of which may be legally privileged. It is for the intended recipient only. If an addressing or transmission error has misdirected this e-mail, please notify the author by replying to this e-mail and then deleting same. If you are not the intended recipient you must not use, disclose, distribute, copy, print or rely on this e-mail. Jembi Health Systems NPO, its subsidiaries and associated companies is not liable for the security of information sent by e-mail and accepts no liability of whatsoever nature for any loss, damage or expense resulting, directly or indirectly, from the access of this e-mail or any attachments hereto.
index.js
openhim-tutorial-services.zip
Reply all
Reply to author
Forward
0 new messages