ecosse3 / nvim

A non-minimal Neovim config built to work most efficiently with Frontend Development
GNU General Public License v3.0
1.21k stars 109 forks source link

ESLint ENOENT error #114

Closed kecerud closed 1 year ago

kecerud commented 1 year ago

Hey, this isn't specifically an issue of Ecovim per se, rather than part of the config from it but I couldn't find any info related to it online so this is my best bet 🙏 .

After checking out the linting via eslint lsp server on save, I am stumbling upon this error (see image) multiple times per day and after that the linter doesn't quite lint the same anymore (meaning that if I open for example VSCode, it lints correctly all the time but after this error, my neovim does crazy stuff).

Do you have any idea what's the case and/or how to fix it? I couldn't find much about this problem online but perhaps some setting up of root_dir or something on similar note?

This is the config in my lsp.lua file:

Screenshot 2022-11-23 at 22 14 12

This is the error:

Screenshot 2022-11-23 at 22 07 13

PS: If I input 1 to "Open Output" nothing happens and the error message closes itself.

Thanks for looking into this.

NiloDrumond commented 1 year ago

Do you have Eslint installed on this project? I'm pretty sure the default Ecovim configs try to format with Eslint on save. If you don't have Eslint on this project then that's for sure the reason.

In that case, you have two options:

kecerud commented 1 year ago

@NiloDrumond Hi Nilo, thanks for reaching out but you probably missed my screenshot/s.

As mentioned in the issue I don't use ecovim as a whole, I just copied part of the code for linting purposes to my own config.

1 - Of course I do have an eslint on my project, it wouldn't make sense not to have it as you mentioned. 2- I already use lsp.buf.format() as you can see on the first screenshot:

Screenshot 2022-11-29 at 13 44 11
NiloDrumond commented 1 year ago

@NiloDrumond Hi Nilo, thanks for reaching out but you probably missed my screenshot/s.

As mentioned in the issue I don't use ecovim as a whole, I just copied part of the code for linting purposes to my own config.

1 - Of course I do have an eslint on my project, it wouldn't make sense not to have it as you mentioned. 2- I already use lsp.buf.format() as you can see on the first screenshot:

Screenshot 2022-11-29 at 13 44 11

I see. Sorry for the hasty read.

From this file in specific, everything looks ok. A few questions that might help us solving your problem are:

  1. Does this only happen in this project or in any project?
  2. Are the eslint error/warn messages actually appearing on nvim? Or is the Eslint Language Server not working at all?
kecerud commented 1 year ago

No worries! Still appreciate the reply.

1 - To be completely honest I'm working on 1 project only at the moment so it happened only in 1 project. 2 - Yeah eslint works completely fine but sometimes when i save a file this error pops out and I have to either restart the LSP multiple times to start linting correctly or quit the whole neovim itself

ecosse3 commented 1 year ago

@kecerud Is this issue resolved?

kecerud commented 1 year ago

@ecosse3 Still happens somewhat often, now also on different projects.

ecosse3 commented 1 year ago

I wasn't able to reproduce that. Please make a PR in order to fix that.