Node.js to Mariadb10.1
trying to use node.js with Mariadb10.1 and I get following error when I run sample program
Program //test ivp var Client = require('mariasql');
var c = new Client({ host: '172.17.0.40', user: 'foot', password: 'foo123' });
c.query('SHOW DATABASES', function(err, rows) { if (err) throw err; console.dir(rows); });
c.end();
:/rakesh # node mariaivp.js
module.js:340
throw err;
^
Error: Cannot find module '../build/Debug/sqlclient'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.
How did you install? Were there any compiler errors?
I git cloned and copied the folder to nod_modules as mariasql folder. I couldn't find any errors
If you did that, you didn't actually build the addon. You should be able to just npm install mariasql which will download and build the addon for you. Otherwise you have to change to the addon directory (and assuming you have already installed node-gyp globally) and do node-gyp rebuild to build the addon manually.
:/rakesh # node mariaivp.js
/node_modules/mariasql/lib/Client.js:34
this._handle = new binding({
^
Error: The async interface is not currently supported on your platform.
at new Client (/node_modules/mariasql/lib/Client.js:34:18)
at Object.
I am getting the above error after I built using the node-gyp as mentioned below and when I ran the program.
What OS/platform are you using and what node version?
I am running this on s390 platform (z system) with SLES12 as OS Node version v0.12.7
Ah ok, I'm not very familiar with that platform. Assuming this is similar to the case with ARM, do you have a ucontext.h in your /usr/include somewhere?