Open
Description
Link to the code that reproduces this issue
https://github.com/daikiejp/eslint-plugin-react-hooks
To Reproduce
- Just install a new fresh install of Next.js with pnpm
- Start editing
- Error from eslint:
Failed to load plugin 'react-hooks' declared in ' » eslint-config-next/core-web-vitals
Complete error:
eslint: -32603: Request textDocument/diagnostic failed with message: Failed to load plugin 'react-hooks' declared in ' » eslint-config-next/core-web-vitals » /Users/danny/dev/eslint-plugin-react-hooks/node_modules/.pnpm/eslint-config-next@15.4.0-canary.19_eslint@9.26.0_jiti@2.4.2__typescript@5.8.3/node_modules/eslint-config-next/index.js': Cannot find module 'eslint-plugin-react-hooks'
Require stack:
- /Users/danny/dev/eslint-plugin-react-hooks/__placeholder__.js
Referenced from: /Users/danny/dev/eslint-plugin-react-hooks/node_modules/.pnpm/eslint-config-next@15.4.0-canary.19_eslint@9.26.0_jiti@2.4.2__typescript@5.8.3/node_modules/eslint-config-next/index.js
This error is related to #73964
Current vs. Expected behavior
While the fix is simple (pnpm add -D eslint-plugin-react-hooks
), it would greatly Next.js should handle peer dependencies and install them in pnpm.
Provide environment information
Operative System:
Platform: darwin
Arch: arm64
Binaries:
Node: v23.11.0
Pnpm: 10.10.0
Relevant Packages:
next: 15.4.0-canary.19
eslint-config-next: 15.4.0-canary.19
Which area(s) are affected? (Select all that apply)
Error Handling, Linting
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
There's no documentation in eslint-config-next
about required peer plugins.