Comments (5)
lothar-joeckel:
First a question, are you using the latest version of Nodem, version 0.3.0? If not upgrade to that, and if so, have you confirmed that everything is set up correctly? Do the other APIs work correctly? For me to test this, I'd need you to send me your code 'run^neo.'
The error you are seeing comes from the JSON parser in Node.js, and means that it isn't valid JSON. I have no problem calling all sorts of different extrinsic functions, with or without arguments, so I'd need your code to debug the issue.
First make sure you are running the latest version, and see if that fixes it. You could run the code in GT.M direct mode first, and show me the output. You can do so like this:
dlw@endor:~/nodem$ mumps -dir
FOIA>w $$function^node("run^neo","9:argument1,4:123")
If you'd like to have me look at this offline, my email address is [email protected].
Thanks for your interest in Nodem, and hopefully we can figure this issue out and get you going again soon.
from nodem.
Hello David,
thanks for your fast reply.
I'm running node v0.10.17.
Running from direct mode works as ecpected:
ljoeckel@ubuntu1204:/gtm$ gtm
GTM>w $$function^node("run^neo","9:argument1,4:123")
{"ok": 1, "function": "run^neo", "arguments": [argument1,123], "result": "^ARG(1)=argument1 ^ARG(2)=123"}
GTM>
ljoeckel@ubuntu1204:/gtm$ node test.js
{ ok: 1,
function: 'version^node',
result: 'Node.js Adaptor for GT.M: Version: 0.3.0 (FWSLC); GT.M V6.0-003 Linux x86_64' }
SyntaxError: Unexpected token a
at Object.parse (native)
at Object. (/gtm/test.js:7:18)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
ljoeckel@ubuntu1204:/gtm$
test.js:
var gtm = require("/gtm/lib/mumps");
var db = new gtm.Gtm();
var ret;
db.open();
var version = db.function({function: 'version^node'});
console.log(version);
ret = db.function({function: 'run^neo',arguments: ['argument1',123]});
console.log("ret=" + JSON.stringify(ret));
db.close();
neo.m:
run(arg1,arg2)
set ^ARG(1)=arg1
set ^ARG(2)=arg2
quit "^ARG(1)="^ARG(1)" ^ARG(2)="_^ARG(2)
Hope this helps. If you can confirm that this will run in your environment then there must be a setup problem in my environment.
Kind regards
Lothar
from nodem.
Lothar,
This is a bug in the newest version of Nodem. I know exactly what the problem is, but unfortunately, I am going to be driving all day today, so I can't fix it right now. I should have a new version with a fix for this bug out tomorrow I hope. In the meantime, if you have to, you could go back to the previous version of Nodem, 0.2.1, as it might not have this bug.
I'm sorry about the inconvenience. Again, thanks for your interest in Nodem, and for your patience while I fix this bug.
from nodem.
Hi David,
thank you very much for your enthusasm. This sounds good.
I am very interested in using GT.M together with nodem/node.js.
So will wait for your fix.
Again, thanks a lot for your help.
Kind regards
Lothar
2013/8/28 David Wicksell [email protected]
Lothar,
This is a bug in the newest version of Nodem. I know exactly what the
problem is, but unfortunately, I am going to be driving all day today, so I
can't fix it right now. I should have a new version with a fix for this bug
out tomorrow I hope. In the meantime, if you have to, you could go back to
the previous version of Nodem, 0.2.1, as it might not have this bug.I'm sorry about the inconvenience. Again, thanks for your interest in
Nodem, and for your patience while I fix this bug.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-23413217
.
from nodem.
I have pushed out version 0.3.1, which I believe has fixed the bug that you uncovered.
from nodem.
Related Issues (15)
- Always getting error GTM-E-SYSCALL HOT 3
- Link to Globals Node.js API Documentation is broken (in README.md) HOT 1
- Error: Module version mismatch. Expected 11, got 1. HOT 1
- error when trying to install with npm on Ubuntu 12.04 LTS 64bit server HOT 1
- enconding problem HOT 2
- Easy install now that apt-get install fis-gtm exists? HOT 3
- function - error when passing argument with quotes HOT 4
- GT.M can not be re-opened HOT 4
- Are lock and unlock needed for transaction commit? HOT 2
- GT.M bindings/drivers for AIX System HOT 2
- Create a HOT 1
- Error on ydb.open(); YottaDB database connection cannot be reopened HOT 2
- Error on opening database HOT 2
- Why YottaDB connection can't be opened by worker thread? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodem.