Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'sort' of undefined #1

Closed
swimmadude66 opened this issue Aug 9, 2017 · 4 comments
Closed

TypeError: Cannot read property 'sort' of undefined #1

swimmadude66 opened this issue Aug 9, 2017 · 4 comments
Assignees

Comments

@swimmadude66
Copy link

swimmadude66 commented Aug 9, 2017

Running in a bash environment on windows. Ran npm i -g gtop, then gtop and got the outline of what is supposed to appear, followed by:

TypeError: Cannot read property 'sort' of undefined
    at Proc.updateData (C:\Users\ayost\AppData\Roaming\nvm\v6.10.0\node_modules\gtop\lib\monitor\proc.js:47:5)
    at si.processes.data (C:\Users\ayost\AppData\Roaming\nvm\v6.10.0\node_modules\gtop\lib\monitor\proc.js:23:12)
    at process.nextTick (C:\Users\ayost\AppData\Roaming\nvm\v6.10.0\node_modules\gtop\node_modules\systeminformation\lib\processes.js:300:25)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Module.runMain (module.js:606:11)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3

Looks like the error is coming from data.list being undefined here:

var data = data.list

@aksakalli
Copy link
Owner

This tool uses systeminformation and some resources like processes are not supported for Windows.

I am personally not using Windows and I created this small tool initially for my own use so PRs are welcome if anyone wants to solve the issues for Windows.

@heroheman
Copy link

Hi, similar error on my WSL Machine, but with used instead of sort.

~  gtop
TypeError: Cannot read property 'used' of undefined
    at Disk.updateData (/usr/local/lib/node_modules/gtop/lib/monitor/disk.js:24:39)
    at Disk.si.fsSize.data (/usr/local/lib/node_modules/gtop/lib/monitor/disk.js:10:10)
    at /usr/local/lib/node_modules/gtop/node_modules/systeminformation/lib/filesystem.js:81:13
    at ChildProcess.exithandler (child_process.js:211:5)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:891:16)
    at Socket.<anonymous> (internal/child_process.js:342:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)

@aksakalli
Copy link
Owner

With c2eb2e8 at least it should not be exiting in Windows and it should show some of the resources

@heroheman
Copy link

Seems like its working for me now. not sure about the network history, but its something. :)
thx for the update!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants