Cannot find module 'DynamicsNode'
jasenkoh opened this issue · 4 comments
jasenkoh commented
I'm on ubuntu usung node 4.2.6 and getting following error
Error: Cannot find module 'DynamicsNode'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/home/jasenko/Desktop/MyScripts/script.js:1:72)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
Could it be because of node version or linux or something third?
crisfervil commented
Hi @jasenkoh
Could you provide an example of the code that is causing the error?
jasenkoh commented
@crisfervil it's sample code from readme
var dn = require("DynamicsNode");
var crm = new dn.CRMClient("Url=http://crm.contoso.com/xrmContoso"); // update this with your CRM url and credentials if needed
var who = crm.whoAmI();
console.log(crm.retrieve("systemuser",who));
crisfervil commented
Yes, you are right. Just lowercase the name in the require part:
var dn = require("dynamicsnode");
That should do the trick.
I'll correct that straight away. Thanks!!
jasenkoh commented
thanks @crisfervil sorry for being too lazy to pay attention