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

stylelint-config-airbnb is causing issues with npm for dependency resolution #119

Closed
dishui opened this issue Aug 17, 2021 · 1 comment
Closed

Comments

@dishui
Copy link

dishui commented Aug 17, 2021

when installing stylelint and stylelint-config-airbnb, I get the following npm Error:
npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: stylelint-t2@1.0.0 npm ERR! Found: stylelint@8.4.0 npm ERR! node_modules/stylelint npm ERR! dev stylelint@"*" from the root project npm ERR! peer stylelint@"^8.0.0" from stylelint-config-airbnb@0.0.0 npm ERR! node_modules/stylelint-config-airbnb npm ERR! dev stylelint-config-airbnb@"*" from the root project npm ERR! 1 more (stylelint-order) npm ERR! npm ERR! Could not resolve dependency: npm ERR! dev stylelint-config-prettier@"*" from the root project npm ERR! npm ERR! Conflicting peer dependency: stylelint@13.13.1 npm ERR! node_modules/stylelint npm ERR! peer stylelint@">=11.0.0" from stylelint-config-prettier@8.0.2 npm ERR! node_modules/stylelint-config-prettier npm ERR! dev stylelint-config-prettier@"*" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

remove the stylelint-config-airbnb, then no more problem. Of course, if one want to use stylelint-config-airbnb, then this is not a good solution. That is why I am reporting the issue here

@ljharb
Copy link
Collaborator

ljharb commented Aug 17, 2021

It's saying the root project specifies stylelint at * (nothing should ever use a *), but v8.x is required by stylelint-config-airbnb - however, stylelint-config-prettier v8.0.2 requires stylelint v11+.

Thus, stylelint-config-airbnb is incompatible with that version of stylelint-config-prettier. You'll have to downgrade that one, or, give up using both of them together.

@ljharb ljharb closed this as completed Aug 17, 2021
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