cronvel / terminal-kit

Terminal utilities for node.js
MIT License
3.11k stars 201 forks source link

Error: .getCursorLocation() timed out when nodemon refreshes process #179

Open SinanAkkoyun opened 3 years ago

SinanAkkoyun commented 3 years ago
[nodemon] restarting due to changes...
[nodemon] starting `node src/index.js`
^[[18;1RX:\discordjs-minecraft-bot\node_modules\terminal-kit\lib\Terminal.js:1448
                var error_ = new Error( '.getCursorLocation() timed out' ) ;
                             ^

Error: .getCursorLocation() timed out
    at X:\discordjs-minecraft-bot\node_modules\terminal-kit\lib\Terminal.js:1448:16
    at Promise._execOneFulfillHandler (X:\discordjs-minecraft-bot\node_modules\seventh\lib\core.js:185:20)
    at Promise._execFulfillHandlers (X\discordjs-minecraft-bot\node_modules\seventh\lib\core.js:171:9)
    at Promise._resolveValue (X:\discordjs-minecraft-bot\node_modules\seventh\lib\core.js:123:62)
    at Promise.resolve.Promise.fulfill (X:\discordjs-minecraft-bot\node_modules\seventh\lib\core.js:115:14)
    at X:\discordjs-minecraft-bot\node_modules\seventh\lib\core.js:89:22
    at Timeout._onTimeout (X:\discordjs-minecraft-bot\node_modules\seventh\lib\misc.js:90:24)
    at listOnTimeout (node:internal/timers:556:17)
    at processTimers (node:internal/timers:499:7) {
  code: 'timeout'
}
[nodemon] app crashed - waiting for file changes before starting...

This happens when trying to run a spinner after nodemon refresh BTW I love this package!

cronvel commented 3 years ago

Hi @SinanAkkoyun, Your terminal doesn't support cursor location request. Are you on Windows?

SinanAkkoyun commented 3 years ago

Hi! I am on windows but when I run it without nodemon it works as expected

Strangely ora spinners do work with nodemon

cronvel commented 3 years ago

Most probably nodemon has some TTY emulation, and it does not forward cursor location request.