1

I have install this:

npm install --save getmac

and insert in my home.components.ts this code

import getMAC, { isMAC } from 'getmac';

and in ngOnInit this code text:

console.log(getMAC());

The Console Error is:

core.js:5873 ERROR Error: failed to get the MAC address
at getMAC (index.js:37)
at HomeComponent.ngOnInit (home.component.ts:15)
at callHook (core.js:3937)
at callHooks (core.js:3901)
at executeInitAndCheckHooks (core.js:3842)
at refreshView (core.js:11795)
at refreshDynamicEmbeddedViews (core.js:13142)
at refreshView (core.js:11800)
at refreshComponent (core.js:13217)
at refreshChildComponents (core.js:11508)

Where am I wrong?

Daniel
  • 21
  • 3

0 Answers0