node-machine-id icon indicating copy to clipboard operation
node-machine-id copied to clipboard

Can't resolve 'child_process' in ' \node_modules\node-machine-id\dist' on Angular Electron

Open didiokener opened this issue 6 years ago • 3 comments

When I implement this package on Angular Electron from https://github.com/maximegris/angular-electron, I get the same error of issue #29, but I am using Angular not Vue.js. I already tried verify if the application is Electron to execute the method machineId only when running on Electron, like, if (isElectron) id = machineIdSync(); But it is running into the same error. Thanks for listening.

didiokener avatar Jan 02 '20 19:01 didiokener

I get the same error in the renderer process. I'm not using any front end framework.

I haven't tried it yet, but I'm planning to run node-machine-id in the main process and just pass the data to the render to try and overcome this issue I haven't been able to resolve.

pjebs avatar Jan 17 '20 01:01 pjebs

Perhaps related to: https://github.com/automation-stack/node-machine-id/issues/29

pjebs avatar Jan 17 '20 01:01 pjebs

Use remote.require('node-machine-id'); import { ElectronService as NgxService } from 'ngx-electron'; image

danielehrhardt avatar Apr 03 '21 21:04 danielehrhardt