-
-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Failed to load plugin '*' declared in 'BaseConfig... #546
Comments
// @Richienb |
There's no way to provide the absolute path of a plugin so I'm not quite sure how to fix it. The issue appears to have been present before xo 0.40.0 but Perhaps it could be possible to set the cwd to a directory that can resolve the plugins and then compute the absolute paths of everything else but that would be opening a can of worms. |
Is this happening because I'm installing xo globally? I'm sorry to report these problems :( I already have an eslint setup in my project directory so I thought installing xo globally (like in the docs) would allow me to try it. |
It is very likely the case. Try a local installation and see if it works. |
I had this problem and a local install of |
I'll try it, it's just that I already have eslint and some plugins installed, and I'm worried that something's going to get messed up :( |
@AndrewMSHowe Can you try running |
@Richienb Maybe we could detect this case and add a human-friendly error message? |
OK weird so that asked me to install xo, and it has apparently put it somewhere other than global or in my project. It doesn't work because of some docker stuff that's mapped into my project folder. I would have to find a way around that. If I run it from a subdir with just source, it gives the same error about plugin 'ava' (I'm not using ava, but I guess it wants to load the plugin anyway). This time the error is |
Sorry I guess I need "npx xo" for local usage when I have installed xo locally rather than letting npx install it in its own stash, so that may have been misleading above. |
Anyway it does work locally, although I'm not sure how I will get it to work automatically in VSCode as well as my current setup. |
Just discovered the |
<gentle nudge> this stuff is also holding up the vscode plugin. Did you get anywhere with your PR? |
As it turns out, fixing this problem causes another one to occur which has led me to conclude that |
Would you be able to elaborate what other problem it causes? For posterity. |
The option doesn't let you specify multiple directories to resolve plugins from so that it would be possible to specify the Because it is also not possible to provide absolute paths as plugins, I don't see any good way to do this. |
@Richienb Thanks for elaborating. It's seems we have hit a dead-end... Maybe it's worth opening an ESLint issue with a proposal with an option/API that could resolve this issue. |
Did you mean install |
When |
Right, thanks. |
I haven't seen this in a while. The problem in any case it's not in XO but in npm and eslint. The solution is to do a fresh reinstall, without lockfile and node_modules. It will eventually be resolved with the flat config: |
With 0.40.1, xo --help works. But in my project folder, xo gives:
Error: Failed to load plugin 'ava' declared in 'BaseConfig » /usr/lib/node_modules/xo/config/plugins.js': Cannot find module 'eslint-plugin-ava'
npm list -g --depth 1 gives (for xo):
So eslint-plugin-ava is there, but something isn't working.
Originally posted by @AndrewMSHowe in #543 (comment)
The text was updated successfully, but these errors were encountered: