ESLint ENOENT error
kecerud opened this issue ยท 7 comments
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:
This is the error:
PS: If I input 1
to "Open Output" nothing happens and the error message closes itself.
Thanks for looking into this.
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:
- Add eslint to your project (I don't see why you wouldn't use it anyway)
- Change the EslintFixAll command to lsp.buf.format()
@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:
@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:
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:
- Does this only happen in this project or in any project?
- Are the eslint error/warn messages actually appearing on nvim? Or is the Eslint Language Server not working at all?
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
I wasn't able to reproduce that. Please make a PR in order to fix that.