SunilWang / node-os-utils

OS Utils - An operating system utility library.
https://www.npmjs.com/package/node-os-utils
MIT License
125 stars 19 forks source link

Run Time error. #23

Open masumluf opened 3 years ago

masumluf commented 3 years ago

Hello, I am getting run time error ,The error is

` /home/localhost/scrap/node_modules/node-os-utils/index.js:1 export let cpu = undefined; ^^^^^^

SyntaxError: Unexpected token 'export' at wrapSafe (node:internal/modules/cjs/loader:1024:16) at Module._compile (node:internal/modules/cjs/loader:1072:27) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10) at Module.load (node:internal/modules/cjs/loader:973:32) at Function.Module._load (node:internal/modules/cjs/loader:813:14) at Module.require (node:internal/modules/cjs/loader:997:19) at require (node:internal/modules/cjs/helpers:92:18) at Object. (/home/masum/localhost/scrap/controller/OS/index.js:1:13) at Module._compile (node:internal/modules/cjs/loader:1108:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10) `

ulri-me commented 1 year ago

This error comes from node.js module loader, not this library.

Please get familiar with import() and require() syntax in node.js and node modules.