Closed CragVFX closed 7 years ago
Hi @CragVFX !
Thanks for reaching out. The reason the npm run functional_tests
works is because it is bringing in the file correctly. Requiring via npm isn't working however.
I'm working on a PR right now for this: https://github.com/MatthewVita/node-hl7-complete/pull/5
Thanks, Matthew
Hi @CragVFX,
I just checked in a fix and updated NPM... please test on a *nix machine and let me know if it works now!
Thanks, Matthew
Hey Matthew,
Thanks for hopping on this so fast.
I had an idea for handling the java dep requiring, but I didn't have the permissions to push my branch up to github for this project. With the below changes, you would just initialize your module when using it like:
var NodeHL7Complete = require('node-hl7-complete'); var hl7 = new NodeHL7Complete(); //use hl7.hl7ToJs or whatever you want now.
Here's the changes, mostly just used the path module to do it, use it if you'd like (I didn't update the unit tests, so those would probably break but this works for the hl7ToJs and jsToHl7:
I made a gist: https://gist.github.com/CragVFX/46a80c20310093a1ebad92662fae0f30
Great!
I just invited you to the repo (will have full access). Let's get your code on a branch/PR and we'll get testing!
Thanks, Matthew
@CragVFX,
I made your branch a PR with added unit tests here: https://github.com/MatthewVita/node-hl7-complete/pull/6
Please test it out and then we'll merge it in a bump the package to 2.0.0 !
Note: I simply commit --amend
'ed your commit so you will get full authorship, despite my small formatting and test fix additions.
Thanks, Matthew
Getting the following error when trying to run the example at the bottom of this issue:
/path/to/my/node_modules/node-hl7-complete/index.js:17 javaBridgeParser = java.newInstanceSync('node_hl7_complete.hl7.Parser'); ^
Error: Could not create class node_hl7_complete.hl7.Parser java.lang.NoClassDefFoundError: node_hl7_complete/hl7/Parser Caused by: java.lang.ClassNotFoundException: node_hl7_complete.hl7.Parser at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
To replicate (OS X):
If I clone the project and install, then run unit_tests, the test cases pass, which is interesting. Any idea what the issue might be?