ibnusyawall/aex-bot

can't display memory usage statistics on mac

Closed this issue · 2 comments

(node:57627) UnhandledPromiseRejectionWarning: InvalidPathError: The following path is invalid (should start by /): C:/ at /Users/subadrun/Documents/programming/hacking/aex-bot/node_modules/check-disk-space/index.js:116:14 at new Promise (<anonymous>) at checkUnix (/Users/subadrun/Documents/programming/hacking/aex-bot/node_modules/check-disk-space/index.js:115:12) at Disk.cdisk (/Users/subadrun/Documents/programming/hacking/aex-bot/lib/diskUsed.js:9:9) at /Users/subadrun/Documents/programming/hacking/aex-bot/routes/index.js:13:8 at Layer.handle [as handle_request] (/Users/subadrun/Documents/programming/hacking/aex-bot/node_modules/express/lib/router/layer.js:95:5) at next (/Users/subadrun/Documents/programming/hacking/aex-bot/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/Users/subadrun/Documents/programming/hacking/aex-bot/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/Users/subadrun/Documents/programming/hacking/aex-bot/node_modules/express/lib/router/layer.js:95:5) at /Users/subadrun/Documents/programming/hacking/aex-bot/node_modules/express/lib/router/index.js:281:22 (node:57627) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:57627) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

open dir lib/diskUsed.js, and then go to line 9 you can find syntax:

odiskSpace('C:/') ....

change 'C:/' with your name disk, example:

odiskSpace('/Users/subadrun/') ...

oke udah solved thanks bro