vite引入nodejs os模块后

85 阅读1分钟

我在vite中引入了nodejs的os模块,企图通过它来获取设备的mac地址。 已经成功的引入了os模块,但是模块下的所有方法的两个参数全都是[TypeError]

  1. arguments: [异常:TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.invokeGetter (:3:28)]
  2. caller: [异常:TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.invokeGetter (:3:28)]

1704184345807.png 目前无法解决这个问题,求大神!!!