eslint_d.js icon indicating copy to clipboard operation
eslint_d.js copied to clipboard

Report issues back to client

Open mantoni opened this issue 6 years ago • 3 comments

Currently the stderr output and any exception thrown in the eslint_d daemon are lost. It would be great to collect process.stderr and catch global errors and report them back to clients.

Alternatively, we could try to find a good place to put logs – or at least let users configure a log output stream when starting the server so that we can trace issues better.

Ref #86

mantoni avatar Apr 10 '18 07:04 mantoni

Hi, a user of SublimeLinter has from time to time "Error: ENOENT: no such file or directory, open /../eslint/node_modules/globals/index.js" and resolves with eslint_d restart. https://github.com/SublimeLinter/SublimeLinter-eslint/pull/327 Ideally I would like to get a message on stderr and restart automatically. (Or show a button so we don't dead-loop lint -> restart -> lint -> restart ...) Is that possible, or as this is a rather old issue already implemented?

kaste avatar Feb 10 '23 21:02 kaste

I just spent several hours trying to figure out why emacs started to spit out this error:

Suspicious state from syntax checker javascript-eslint: Flycheck checker javascript-eslint returned 2, but its output contained no errors: Error: Cannot find module '.../node_modules/@eslint/eslintrc/node_modules/js-yaml/index.js'

Turns out there was a stale ~/.eslint_d file. Also fixed by eslint_d restart.

Some sensible feedback from the server would be really nice! ./

panaak avatar Feb 15 '23 15:02 panaak

I'm currently too busy, but would help, review and accept PRs.

Things that can be improved:

  • Improve client error message when unable to connect.
  • Communicate server issues back to client.
  • Add a --log <file> option for debugging purposes.

Help with any of those ideas would be appreciated. 🙏

mantoni avatar Apr 15 '23 07:04 mantoni