Skip to content

fix(create-next-app): Add missing ESLint packages #82489

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

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from

Conversation

HardMin
Copy link

@HardMin HardMin commented Aug 9, 2025

Fixing a bug

What?

  • This pull request (PR) fixes an issue where the ESLint configuration in new Next.js projects with TypeScript is configured to use specific plugins, but these plugins are not automatically installed.
  • As a result, linting analysis of .tsx files fails with "missing package" errors, even though the configuration is present.
  • The project template currently omits the packages required for a fully functioning ESLint configuration.

Why?

When using the create-next-app command with the following options, the lint command fails with the following errors:

With these installation options.

2025-08-08_12-46

You get this error from ESLint

error

Errors

Error: Failed to load plugin 'react-hooks' declared in ' » eslint-config-next/core-web-vitals » /workspace/contribute/sites-test/test-eslint/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/eslint-config-next/index.js': Cannot find module 'eslint-plugin-react-hooks'

Error: Failed to load plugin '@next/next' declared in ' » eslint-config-next/core-web-vitals » /workspace/contribute/sites-test/test-eslint/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/eslint-config-next/index.js': Cannot find module '@next/eslint-plugin-next'

How?

This PR modifies the devDependencies of the with-eslint template to include the following packages:

Adding the following packages

  • eslint-plugin-react-hooks
  • @next/eslint-plugin-next

ESLint configuration issue fixed

@ijjk ijjk added the examples Issue was opened via the examples template. label Aug 9, 2025
@ijjk
Copy link
Member

ijjk commented Aug 9, 2025

Allow CI Workflow Run

  • approve CI run for commit: 1c6ee96

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples Issue was opened via the examples template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants