Closed montanaflynn closed 7 years ago
Duplicate of #28, closing
I'm not using Webstorm terminal. That issue is also closed but is not resolved.
hi @montanaflynn ,
Which terminal emulator are you using on your macOS?
iTerm2
I meet the same error, my terminal is Tilda 1.3.3:
➜ ~ gtop
RangeError: "size" argument must not be negative
at Function.Buffer.alloc (buffer.js:229:3)
at new Buffer (buffer.js:152:19)
at new Canvas (/usr/lib/node_modules/gtop/node_modules/drawille-blessed-contrib/index.js:17:18)
at new Context (/usr/lib/node_modules/gtop/node_modules/drawille-canvas-blessed-contrib/index.js:11:18)
at module.exports.Canvas.getContext (/usr/lib/node_modules/gtop/node_modules/drawille-canvas-blessed-contrib/index.js:274:24)
at Donut.<anonymous> (/usr/lib/node_modules/gtop/node_modules/blessed-contrib/lib/widget/canvas.js:22:29)
at Donut.EventEmitter._emit (/usr/lib/node_modules/gtop/node_modules/blessed/lib/events.js:98:20)
at Donut.EventEmitter.emit (/usr/lib/node_modules/gtop/node_modules/blessed/lib/events.js:117:12)
at emit (/usr/lib/node_modules/gtop/node_modules/blessed/lib/widgets/node.js:109:15)
at Screen.Node.insert (/usr/lib/node_modules/gtop/node_modules/blessed/lib/widgets/node.js:111:5)
➜ ~ node --debug /usr/bin/gtop
(node:27000) [DEP0062] DeprecationWarning: `node --debug` and `node --debug-brk` are invalid. Please use `node --inspect` or `node --inspect-brk` instead.
➜ ~ node --inspect /usr/bin/gtop
Debugger listening on ws://127.0.0.1:9229/90ec5b9d-ae42-4f5e-8b12-b9d0948aaaef
For help see https://nodejs.org/en/docs/inspector
RangeError: "size" argument must not be negative
at Function.Buffer.alloc (buffer.js:229:3)
at new Buffer (buffer.js:152:19)
at new Canvas (/usr/lib/node_modules/gtop/node_modules/drawille-blessed-contrib/index.js:17:18)
at new Context (/usr/lib/node_modules/gtop/node_modules/drawille-canvas-blessed-contrib/index.js:11:18)
at module.exports.Canvas.getContext (/usr/lib/node_modules/gtop/node_modules/drawille-canvas-blessed-contrib/index.js:274:24)
at Donut.<anonymous> (/usr/lib/node_modules/gtop/node_modules/blessed-contrib/lib/widget/canvas.js:22:29)
at Donut.EventEmitter._emit (/usr/lib/node_modules/gtop/node_modules/blessed/lib/events.js:98:20)
at Donut.EventEmitter.emit (/usr/lib/node_modules/gtop/node_modules/blessed/lib/events.js:117:12)
at emit (/usr/lib/node_modules/gtop/node_modules/blessed/lib/widgets/node.js:109:15)
at Screen.Node.insert (/usr/lib/node_modules/gtop/node_modules/blessed/lib/widgets/node.js:111:5)
➜ ~
System Info:
➜ ~ screenfetch
-`
.o+` guyskk@archlinux
`ooo/ OS: Arch Linux
`+oooo: Kernel: x86_64 Linux 4.12.13-1-ARCH
`+oooooo: Uptime: 3d 18h 1m
-+oooooo+: Packages: 1369
`/:-:++oooo+: Shell: zsh 5.4.2
`/++++/+++++++: Resolution: 3840x1080
`/++++++++++++++: DE: GNOME
`/+++ooooooooooooo/` WM: GNOME Shell
./ooosssso++osssssso+` WM Theme:
.oossssso-````/ossssss+` GTK Theme: Adwaita [GTK2/3]
-osssssso. :ssssssso. Icon Theme: Adwaita
:osssssss/ osssso+++. Font: Cantarell 11
/ossssssss/ +ssssooo/- CPU: Intel Core i5-6200U @ 4x 2.8GHz [63.0°C]
`/ossssso+/:- -:/+osssso+- GPU: intel
`+sso+:-` `.-/+oso: RAM: 5826MiB / 7883MiB
`++:. `-/+/
.` `/
it is due to terminal size.
The dashboard constructor throws this exception when the character size is very small to draw. It is required to have a better error handling, I guess...
Environment
v7.10.0
)0.1.5
)Description
When I run
gtop
I get this error: