Closed edrpls closed 5 years ago
Consider running eslint --debug /home/myUser/Projects/myDir/mySubDir/app/components/builder/QuestionHorizontalNav.jsx from a terminal to obtain a trace about the configuration files used.
As I mentioned in the ticket originally, this command produces no errors, and everything runs fine from the terminal, the issue only occurs within neovim, running coc-eslint, please reopen the ticket.
if you have local eslint, install local plugins as well
What is the case for setting a eslint.nodePath
configuration if installing the local modules is required?
Can't reproduce
[Info - 2:49:19 PM] ESLint library loaded from: /home/myUser/Projects/someProject/someSubDir/node_modules/eslint/lib/api.js
Yes, please read again my ticket, I mentioned that coc-eslint is trying to read the local modules instead of reading the globally installed modules set in coc-settings.json
. I did look into all the warnings, I only opened this issue because the behavior from coc-eslint is inconsistent with the documentation, especifically with eslint.nodePath
.
eslint.nodePath
is fallback global module directory, it use local eslint module when possible, so it's expected.
use this setting if an installed ESLint package can't be detected.
Can you understand what can't be detected
means?
No need to attack, I do understand what can't be detected
means, and to be honest I think there is some miscommunication or something is getting lost in translation here since I think none of us is a native speaker, I believe we both are making the same point, the modules don't exist locally, this is a limitation of my setup that I cannot change, but what I can do is install modules globally.
One would precisely think that
use this setting if an installed ESLint package can't be detected.
means setting eslint.nodePath
is useful in my cases where local dependencies are not found, reason why I added this configuration.
I didn't mean to ruffle any feathers, I thought my original post included enough information to help debug this, as I have looked all the other tickets that even closely resemble mine and attempted all their solutions. I think most of what I wrote was ignored, and that's fine, OSS comes with no guarantees after all, but I do think it could've helped more people in the future, instead, pretty much everything I wrote was disregarded without a second thought.
Anyway, I appreciate the time you took and the software you've built.
/home/myUser/Projects/someProject/someSubDir/node_modules/eslint/lib/api.js
It's quite clear that eslint module exists in your project.
Thanks for your response, the weird thing is that running ls
on that dir returns nothing. Maybe this is caused by docker. I will try to ditch it for local development, as it is causing other issues. Sorry for the misunderstanding.
Hi, first of all, thank you for all your work!
I cannot use local node_modules as I run my app inside a docker container and the modules are not shared with the host, and I've run into a problem where coc-eslint is unable to find the global node modules, even though I think it is properly configured.
Output of
:version
:The output of
npm root -g
is:My
coc-settings.json
:The first error I see when opening Neovim on javascript/jsx files:
Running the above suggestion from the terminal runs fine and returns no errors.
Running
:CocCommand workspace.showOutput
for eslint shows:Here's the output of
ls /home/myUser/.npm-global/lib/node_modules
:I do have the right modules installed globally, but for some reason coc-eslint is ignoring the global directory
/home/myUser/.npm-global/lib/node_modules
.Am I missing something from the configuration?
Any help is appreciated, thank you!