No such module: atom_common_app when trying to call C# dll method from angular in renderer process
I am trying to call a C# dll in the renderer process using electron-edge. The following code works when i call it directly from the renderer.js file, but when i pass the "integration" variable to angular, and angular calls it later on, i get the error at the bottom. I dont know how the behaviour of calling it from the renderer process or from angular might cause a difference.
Does anyone has some ideas?
var elec = require('electron');
var edge = elec.remote.require('electron-edge')
var csharpInvoke = edge.func({
assemblyFile: '../Shared/bin/Debug/Shared.dll',
});
var csharpProxy = csharpInvoke(null, true);
var integration = csharpProxy.createIntegration(null, true);
console.log(integration);
console.log(integration.getChildren('ROOT', true)); // Works! but when called from angular, doesnt!
Full stackstrace
Error: No such module: atom_common_app at Error (native) at process.atomBinding (C:_Data\Repositories\sleek-application\Client\node_modules\electron\dist\resources\electron.asar\common\init.js:8:22) at Object.
(C:_Data\Repositories\sleek-application\Client\node_modules\electron\dist\resources\electron.asar\browser\api\app.js:3:26) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) (anonymous function) @ angular.js:11595 (anonymous function) @ angular.js:8545 invokeLinkFn @ angular.js:8216 nodeLinkFn @ angular.js:7723 compositeLinkFn @ angular.js:7076 publicLinkFn @ angular.js:6955 updateView @ angular-ui-router.js:3839 (anonymous function) @ angular-ui-router.js:3801 $broadcast @ angular.js:14704 $state.transition.resolved.then.$state.transition @ angular-ui-router.js:3218 processQueue @ angular.js:13172 (anonymous function) @ angular.js:13188 $eval @ angular.js:14385$digest @ angular.js:14201 $apply @ angular.js:14490done @ angular.js:9647 completeRequest @ angular.js:9837 requestLoaded @ angular.js:9778