-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Nextjs 13.4.9 - ESLint couldn't determine the plugin "react-hooks" uniquely. #52365
Comments
I am running into the same issue with npm:
My lint config is using npm list eslint-plugin-react-hooks
my-repo
├─┬ my-app
│ └─┬ eslint-config-next@13.4.9
│ └── eslint-plugin-react-hooks@5.0.0-canary-7118f5dd7-20230705
└─┬ my-lint-config
└── eslint-plugin-react-hooks@4.6.0
|
Also running into this issue, reverting to eslint-config-next@13.4.8 seems to fix the problem for now |
- apply simple-import-sort - react-hooks error fix with @13.4.8 vercel/next.js#52365
- apply simple-import-sort - remove react-hooks vercel/next.js#52365
Any update here? We're still blocked in 13.4.12. |
Just an update: we are still experiencing this issue with the latest release 13.4.13. |
Can anyone look at this? We are still stuck on version 13.4.7 because of this issue. |
I could remove this error by removing the direct dependency of eslint-plugin-react-hooks, and instead use the one that is bundled by NextJs |
Fixes #52365 In #52275 that eslint config changed to a fixed canary version to leverage the improvement of `react-hooks` eslint plugin but breaks the installation when 3rd party packages having strict matching for certain version of eslint plugin. This PR allows both previous version and the canary version be present.
still experiencing this issue in 13.4.18. got it working with manual resolution
|
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #47~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 21 15:35:31 UTC 2 Binaries: Node: 18.16.0 npm: 9.5.1 Yarn: N/A pnpm: 8.6.6 Relevant Packages: next: 13.4.9 eslint-config-next: 13.4.9 react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.6 Next.js Config: output: N/A
Which area(s) of Next.js are affected? (leave empty if unsure)
ESLint (eslint-config-next)
Link to the code that reproduces this issue or a replay of the bug
belgattitude/artist#7
To Reproduce
See belgattitude/artist#7 and https://github.com/belgattitude/artist/actions/runs/5480794201/jobs/9984365681?pr=7
Describe the Bug
Since #52275, projects using a custom eslint configuration might run into
Nextjs 13.4.9 - ESLint couldn't determine the plugin "react-hooks" uniquely.
Based on the reproduction PR above, see an example
In that case there will be 2 versions installed (with pnpm at least)
devDependencies:
@belgattitude/eslint-config-bases 1.35.1
└── eslint-plugin-react-hooks 4.6.0
eslint-config-next 13.4.9
└── eslint-plugin-react-hooks 5.0.0-canary-7118f5dd7-20230705
Which leads to
ESLint couldn't determine the plugin "react-hooks" uniquely.
As a workaround:
Expected Behavior
Imho, eslint-plugin-next should allow usage of customized/shared eslint-config. Using a canary: eslint-plugin-react-hooks 5.0.0-canary-7118f5dd7-20230705 makes the setup slightly more difficult for some advanced usages.
PS: Tested with pnpm 8.6.6 and yarn 4.0.0-rc.48 but I guess other variant will fail to as it's different major version.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
NEXT-1476
The text was updated successfully, but these errors were encountered: