automation-stack / node-machine-id

Unique machine (desktop) id (no admin privileges required)
MIT License
577 stars 59 forks source link

Can not run on Angular 10 #54

Open NikolayTodor opened 3 years ago

NikolayTodor commented 3 years ago

Implementation

customer-service.component.ts

import * as _ from 'node-machine-id';

ngOnInit(): void { console.log(_);}

package.json

, "browser":{ "child_process": false, "crypto": false }

Error:

Uncaught ReferenceError: process is not defined at Object.<anonymous> (index.js:1) at n (index.js:1) at Object.<anonymous> (index.js:1) at n (index.js:1) at index.js:1 at index.js:1 at index.js:1 at Object.4brq (index.js:1) at __webpack_require__ (bootstrap:84) at Module.kiBU (customer-services.component.ts:3)

danielehrhardt commented 3 years ago

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