Giter Site home page Giter Site logo

Comments (4)

dlwicksell avatar dlwicksell commented on May 30, 2024

Hi Joel,

Can you tell me what version of Nodem you are running? I suspect it is an older one, or possibly the latest mumps.node with an older v4wNode.m or node.m. I do not get this issue with the latest version, though it did point out another small bug. I copied and pasted your M routine and JS script for this test. E.g.

$ node testRunner.js
{ ok: 1,
function: 'MYTAG^MYROUTINE',
result: 'OK',
subscripts: [ 1, 'no_quotes', 'string_"with"_quotes' ] }

The small bug is that the return object is now returning a subscripts property instead of an arguments property, which is what makes me think you are running an older version, either of mumps.node, v4wNode.m/node.m, or both. I will fix the wrong property bug of course. So the first step is to determine what version of Nodem you are running, and make sure your environment is set up correctly.

Also, I am going to be releasing a new version with several bug fixes and encoding improvements soon. I also have a development version that will become a new release with a ton of new features and new APIs, and other improvements, including passing arguments by position, in addition to the current passing by object, as well as asynchronous APIs, to match the Caché driver, as well as adhere to Node.js best practices for database I/O.

Thanks for your kind words and interest in Nodem.

from nodem.

joel-bitscopic avatar joel-bitscopic commented on May 30, 2024

I knew I forgot to include something... Thanks for the quick response - especially over the weekend. I must not have the latest version if it's working ok for you.

I thought I was running version 0.3.3 given by:

vista@dEWDrop:~/share$ npm list -g
/usr/lib
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
¦ +-- [email protected]
+-- [email protected]
+-- [email protected]
¦ +-- [email protected]
¦ +-- [email protected]
+-- [email protected]

But, when I run this:

MU-beta>WRITE $$version^node
Node.js Adaptor for GT.M: Version: 0.1.0 (FWSLC); GT.M V6.0-001 Linux x86

Is that right?

I tried updating nodem yesterday, btw. I ran:

"npm update -g nodem"

Which seemed to be successful.

Thanks again. Much appreciated.

from nodem.

dlwicksell avatar dlwicksell commented on May 30, 2024

Yeah, the best way to see what version you are running is with the version() API, both before and after opening the database connection. E.g. db.version()

You are definitely using the wrong version of the M code, as you are running node.m in your example. The routine is now called v4wNode.m. V4W being my official VistA namespace. I screwed up as I should have namespaced it to begin with.

So you will want to make sure that v4wNode.m from the src/ directory of 0.3.3 is in your $gtmroutines path, and also that $GTMCI is set to point to nodem.ci from the resources/ directory of 0.3.3. I also changed the name of the call-in table from the generic calltab.ci to nodem.ci.

It definitely looks like you are using an older version of the call-in table (calltab.ci) and it is pointing to the older M routine, node.m, rather than v4wNode.m.

Good luck.

from nodem.

joel-bitscopic avatar joel-bitscopic commented on May 30, 2024

Looks like it was the version:

  • copied v4wNode in to a GTM routine directory
  • ran "export GTMCI=/home/vista/.npm/nodem/0.3.3/package/resources/nodem.ci"

And the version^v4wNode works and outputs 0.3.3. It also appear that, as you stated, the issue with the double quotes went away per my original test. Thanks again for the help. I'll try closing this as resolved.

from nodem.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.