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

[Bug]: Upstream ESLint dependency conflict #7802

Closed
Saveljeffjonatan opened this issue Sep 4, 2024 · 3 comments · Fixed by #7854
Closed

[Bug]: Upstream ESLint dependency conflict #7802

Saveljeffjonatan opened this issue Sep 4, 2024 · 3 comments · Fixed by #7854
Assignees
Labels
bug Something isn't working

Comments

@Saveljeffjonatan
Copy link

System Info

System:
OS: macOS 14.5
CPU: (8) arm64 Apple M1
Memory: 58.61 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.0 - /usr/local/bin/node
npm: 10.2.4 - /usr/local/bin/npm
pnpm: 9.4.0 - /usr/local/bin/pnpm
bun: 1.0.26 - ~/.bun/bin/bun
Browsers:
Chrome: 128.0.6613.119
Safari: 17.5

Details

$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: testing@1.0.0
npm ERR! Found: eslint@9.9.1
npm ERR! node_modules/eslint
npm ERR! dev eslint@"^9.9.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" from eslint-plugin-react-hooks@4.6.2
npm ERR! node_modules/eslint-plugin-react-hooks
npm ERR! dev eslint-plugin-react-hooks@"^4.6.2" 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.

Reproduce link

No response

Reproduce Steps

$ npm create rspack@latest

◆ Create Rspack Project

◇ Project name or path
│ testing

◇ Select framework
│ React

◇ Select language
│ TypeScript

◇ Select additional tools (Use to select, to continue)
│ Add ESLint for code linting, Add Prettier for code formatting

◇ Next steps ──╮
│ │
│ cd testing │
│ npm i │
│ npm run dev │
│ │
├───────────────╯

└ Done.

  1. cd [repo]

  2. npm install

@Saveljeffjonatan Saveljeffjonatan added bug Something isn't working pending triage The issue/PR is currently untouched. labels Sep 4, 2024
@cmdcolin
Copy link

cmdcolin commented Sep 5, 2024

this doesn't strictly help you but eslint-plugin-react-hooks@next (their next v5 version, currently in rc tags on npm) will fix this. there are probably other workarounds you can do but once that is released it should be the proper fix

@cmdcolin
Copy link

cmdcolin commented Sep 5, 2024

can of course use --legacy-peer-deps and/or resolutions in package.json to get the eslint-plugin-react-hooks@next (see facebook/react#28773 for the recently merged pr)

@chenjiahan
Copy link
Member

We will wait for eslint-plugin-react-hooks to release 5.0 stable and then update Rspack's template

@chenjiahan chenjiahan removed the pending triage The issue/PR is currently untouched. label Sep 5, 2024
@chenjiahan chenjiahan changed the title [Bug]: Upstream dependency conflict [Bug]: Upstream ESLint dependency conflict Sep 5, 2024
@chenjiahan chenjiahan self-assigned this Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants