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

Error: Failed to load plugin 'unicorn' declared in '.eslintrc.js » xxxx\node_modules\@umijs\fabric\dist\eslint.js': Cannot find module 'eslint-plugin-unicorn' #152

Open
zhikangfan opened this issue Jul 31, 2023 · 1 comment

Comments

@zhikangfan
Copy link

image

@Drew-Daniels
Copy link

Drew-Daniels commented Oct 10, 2023

Same issue here. Not all of the eslint plugins like eslint-plugin-react or eslint-plugin-import are downloaded when @umijs/fabric is.

yarn run v1.22.19
$ /Users/drew.daniels/projects/<project-name>/node_modules/.bin/eslint 'src/**/*.*s*' --quiet

Oops! Something went wrong! :(

ESLint: 8.44.0

ESLint couldn't find the plugin "eslint-plugin-react".

(The package "eslint-plugin-react" was not found when loaded as a Node module from the directory "/Users/drew.daniels/projects/keet-umi".)

It's likely that the plugin isn't installed correctly. Try reinstalling by running the following:

    npm install eslint-plugin-react@latest --save-dev

The plugin "eslint-plugin-react" was referenced from the config file in ".eslintrc.js".

If you still can't figure out the problem, please stop by https://eslint.org/chat/help to chat with the team.

这是一个 TypeScript 项目,如果不是请删除 tsconfig.json
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

keet-umi on  dd/feature/umi-v3-upgrade [$!] via 🐳 desktop-linux  v16.18.1
❯

The above is after running yarn upgrade @umijs/fabric --latest && rm -rf node_modules && yarn && yarn eslint <folder>

A non-optimal workaround is installing these plugins yourself, but these should really be included with @umijs/fabric

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

2 participants