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

Cannot execute $ npx install-peerdeps #2436

Closed
space7panda opened this issue Jun 2, 2021 · 5 comments
Closed

Cannot execute $ npx install-peerdeps #2436

space7panda opened this issue Jun 2, 2021 · 5 comments

Comments

@space7panda
Copy link

$ npx install-peerdeps --dev eslint-config-airbnb

install-peerdeps v3.0.3
Installing peerdeps for eslint-config-airbnb@latest.
npm install eslint-config-airbnb@18.2.1 eslint@^7.2.0 eslint-plugin-import@^2.22.1 eslint-plugin-jsx-a11y@^6.4.1 eslint-plugin-react@^7.21.5 eslint-plugin-react-hooks@^1.7.0 --save-dev

ERR undefined

node.js - v14.16.0
npm - v7.15.1

@ljharb
Copy link
Collaborator

ljharb commented Jun 2, 2021

What happens if you run the npm install command it prints out, directly?

(Either way this seems like a bug with install-peerdeps and not this repo)

@space7panda
Copy link
Author

What happens if you run the npm install command it prints out, directly?

(Either way this seems like a bug with install-peerdeps and not this repo)

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: tsttst@1.0.0
npm ERR! Found: eslint@7.27.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^7.2.0" from the root project
npm ERR!   peer eslint@"^5.16.0 || ^6.8.0 || ^7.2.0" from eslint-config-airbnb@18.2.1
npm ERR!   node_modules/eslint-config-airbnb
npm ERR!     dev eslint-config-airbnb@"18.2.1" from the root project
npm ERR!   3 more (eslint-plugin-import, eslint-plugin-jsx-a11y, eslint-plugin-react)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" from eslint-plugin-react-hooks@1.7.0
npm ERR! node_modules/eslint-plugin-react-hooks
npm ERR!   dev eslint-plugin-react-hooks@"^1.7.0" from the root project
npm ERR!   peer eslint-plugin-react-hooks@"^4 || ^3 || ^2.3.0 || ^1.7.0" from eslint-config-airbnb@18.2.1
npm ERR!   node_modules/eslint-config-airbnb
npm ERR!     dev eslint-config-airbnb@"18.2.1" 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.
npm ERR!
npm ERR! See /Users/s7p/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/s7p/.npm/_logs/2021-06-02T17_45_39_594Z-debug.log

Looks like --force helped for npm i, maybe there something similar for npx 🤔

@ljharb
Copy link
Collaborator

ljharb commented Jun 2, 2021

Looks like v1.7.0 of eslint-plugin-react-hooks is the problem. Change that to “latest” in your npm install command - don’t use force - and please file this on install-peerdeps. It appears it’s not grabbing the peer deps correctly.

@space7panda
Copy link
Author

Looks like v1.7.0 of eslint-plugin-react-hooks is the problem. Change that to “latest” in your npm install command - don’t use force - and please file this on install-peerdeps. It appears it’s not grabbing the peer deps correctly.

Yup, you are right. The following code works fine:

npm install eslint-config-airbnb@18.2.1 eslint@^7.2.0 eslint-plugin-import@^2.22.1 eslint-plugin-jsx-a11y@^6.4.1 eslint-plugin-react@^7.21.5 eslint-plugin-react-hooks@latest --save-dev

@KasirTiavina2110
Copy link

Hey guys, it not work, same error reappear after npm install eslint-config-airbnb@18.2.1 eslint@^7.2.0 eslint-plugin-import@^2.22.1 eslint-plugin-jsx-a11y@^6.4.1 eslint-plugin-react@^7.21.5 eslint-plugin-react-hooks@latest --save-dev.
So someone have other solution ? thanks

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