-
Notifications
You must be signed in to change notification settings - Fork 611
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
[eslint-patch] Failed to patch ESLint when using next/core-web-vitals configuration #5049
Comments
Has anyone found a workaround other than deleting next/core-web-vitals from the project? I noticed it used to work (as shown in this tutorial: https://blog.linotte.dev/eslint-9-next-js-935c2b6d0371), so I assume it depends on the versions of certain packages. However, I haven't been able to identify a set of working package versions. |
Looks like @D4N14L, if you have some time would you mind taking a look at this? We could start by putting together a |
Same issue here. I am using eslint ^9.18.0. For the workaround, what should I do? |
Same issue |
same error ┌──(xiao㉿Xiaobang)-[~/Documents/Projects/JGR/frontend] Oops! Something went wrong! :( ESLint: 9.20.1 Error: Failed to patch ESLint because the calling module was not recognized. |
Summary
I encountered an issue while trying to lint a Next.js project using
pnpm dlx eslint
with thenext/core-web-vitals
configuration. The ESLint process fails when this configuration is included but works fine when it is removed or commented out. This issue appears to involve@rushstack/eslint-patch
in combination witheslint-config-next
.Repro steps
cd my-app
Expected result:
The file should be linted without any issues.
Actual result:
The following error is displayed
next/core-web-vitals
configuration in eslint.config.mjs resolves the issue.Details
The issue occurs specifically when the
next/core-web-vitals
configuration is included in the ESLint configuration. Removing this configuration prevents the error. The root cause seems to involve@rushstack/eslint-patch
and its handling of this configuration, possibly due to module resolution or versioning conflicts.Standard questions
Please answer these questions to help us investigate your issue more quickly:
node -v
)?The text was updated successfully, but these errors were encountered: