midhun k midhun k - 5 months ago 49
Node.js Question

Error: Cannot find module '../build/Debug/sqlclient'

In directory i did the standard- npm install mariasql --save.
when i run my server file -node app.js.
It returns an error like this:

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.<anonymous> (/home/asa/Dropbox/justRent/development/node_modules/mariasql/lib/Client.js:12:11)
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 Module.require (module.js:364:17)

Answer

I hope this is not issue from node side, please Check your db sever is receiving connection from all the host, if not set the privileges correctly as using GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'DBPASSWORD' WITH GRANT OPTION; from the default user table, after set this try to reinstall the maria sql package in node and give a try.