Skip to content
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

Plugins failing to load? #473

Closed
tjrgg opened this issue May 9, 2020 · 3 comments
Closed

Plugins failing to load? #473

tjrgg opened this issue May 9, 2020 · 3 comments

Comments

@tjrgg
Copy link
Contributor

tjrgg commented May 9, 2020

I recently upgraded xo to v0.30.0. Everything was working fine with v0.29.1, but it seems that now, xo fails due to not being able to load ava plugin, even though I can see that the plugin is installed in the xo directory under node_modules.

I tried solving this by installing eslint-plugin-ava locally as a dev dependency for my module. This seems to have worked, but introduced the same problem for the unicorn plugin (same error, but for unicorn instead of ava). I didn't see anything in the release notes about this, so I'm assuming there's some kind of problem.

The full error message is below. I censored out the full path to my module and replaced it with ... which represents its root. I'm using Windows, Node 13.13.0, ESLint 7.0.0.

Failed to load plugin 'ava' declared in 'BaseConfig » C:\...\node_modules\xo\config\plugins.js': Cannot find module 'eslint-plugin-ava'

@tjrgg
Copy link
Contributor Author

tjrgg commented May 16, 2020

So, after playing around with XO for a while working on #480, I've come to discover that it seems that XO is only looking for configs and plugins in the the main project node_modules directory and not the node_modules directory of any dependencies. I'm unsure if this is due to the changes in plugin resolving in ESLint 7 or if it's something else.

@sindresorhus
Copy link
Member

eslint/eslint#3458

@fregante
Copy link
Member

fregante commented Aug 6, 2022

Closing in favor of #546

@fregante fregante marked this as a duplicate of #546 Aug 6, 2022
@fregante fregante closed this as not planned Won't fix, can't repro, duplicate, stale Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants