Next app build failing due to eslint error - Plugin "react-hooks" was conflicted (Post update to 13.9.5 versions)

See original GitHub issue

Current Behavior

Whenver I run build of my next app it fails giving this error - Plugin “react-hooks” was conflicted between “apps\app-shell-ssr.eslintrc.json » eslint-config-next/core-web-vitals » C:\Sprint-8.6\idp-app-seed-ui-template\node_modules\eslint-config-next\index.js » plugin:react-hooks/recommended” and “apps\app-shell-ssr.eslintrc.json » …/…/.eslintrc.json”.

Expected Behavior

Next app builds should be fine after updating from 13.5.3 versions to 13.9.3(I used nx migrate)

Steps to Reproduce

here is my eslintrc.json { “extends”: [ “plugin:@nrwl/nx/react-typescript”, “…/…/.eslintrc.json”, “next”, “next/core-web-vitals” ], “ignorePatterns”: [ “!/" ], “overrides”: [ { “files”: [ ".ts", “.tsx", ".js”, “.jsx" ], “parserOptions”: { “project”: [ "apps/app-shell-ssr/tsconfig(.)?.json” ] }, “rules”: { “@next/next/no-html-link-for-pages”: [“error”, “apps/app-shell-ssr/pages”] } }, { “files”: [ “.ts", ".tsx” ], “rules”: {} }, { “files”: [ “.js", ".jsx” ], “rules”: {} } ] } and lint config within project.json “lint”: { “executor”: “@nrwl/linter:eslint”, “outputs”: [“{options.outputFile}”], “options”: { “lintFilePatterns”: [ "apps/app-shell-ssr//*.{ts,tsx,js,jsx}” ] } },

Cannot share PR links,as it is for a private repo

This issue may not be prioritized if details are not provided to help us reproduce the issue.

Failure Logs

image

Environment

Node : 16.14.2 OS : win32 x64 yarn : 1.21.1

nx : 13.9.5 @nrwl/angular : Not Found @nrwl/cypress : 13.9.5 @nrwl/detox : Not Found @nrwl/devkit : 13.9.5 @nrwl/eslint-plugin-nx : 13.9.5 @nrwl/express : 13.9.5 @nrwl/jest : 13.9.5 @nrwl/js : 13.9.5 @nrwl/linter : 13.9.5 @nrwl/nest : 13.9.5 @nrwl/next : 13.9.5 @nrwl/node : 13.9.5 @nrwl/nx-cloud : Not Found @nrwl/nx-plugin : Not Found @nrwl/react : 13.9.5 @nrwl/react-native : Not Found @nrwl/schematics : Not Found @nrwl/storybook : 13.5.3 @nrwl/web : 13.9.5 @nrwl/workspace : 13.9.5 typescript : 4.3.5 rxjs : 6.6.7

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:7
  • Comments:22 (3 by maintainers)

github_iconTop GitHub Comments

17reactions
vinicius5581commented, Apr 18, 2022

Any updates to this? I’m dealing with a similar issue:

error - ESLint: Plugin "@next/next" was conflicted between ".eslintrc.json » eslint-config-next/core-web-vitals » plugin:@next/next/core-web-vitals" and "../../../.eslintrc.json » eslint-config-next/core-web-vitals » plugin:@next/next/core-web-vitals".
6reactions
HaNdTriXcommented, Sep 6, 2022

This error often happens if you have an conflicting .eslintrc file up your directory tree.

Example

| - some-dir/.eslintrc <- conflicting config
| - some-dir/somepath/your-project/.eslintrc

Solutions

Choose one of the solutions below:

A. Resolve Conflict

Find the conflicting .eslintrc configuration file and resolve the conflict.

B. Make your .eslintrc a root config

File: .eslintrc.json

{
+ "root": true
  "extends": "next/core-web-vitals"
}

More info

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR in Plugin "react" was conflicted between ".eslintrc.json ...
The problem: eslint-plugin-react version in your project's dependency is "different" from the one in eslint-config-react-app package's ...
Read more >
plugin "react-hooks" was conflicted between - You.com
nrwl/nxNext app build failing due to eslint error - Plugin "react-hooks" was conflicted (Post update to 13.9.5 versions)#9617. Created 9 months ago.
Read more >
How to Fix ERROR in Plugin 'react' was conflicted between ...
How to Fix ERROR in Plugin 'react' was conflicted between 'package.json' and 'eslint-config-react-app'? · Solution 1: Check the DIRECTORY name.
Read more >
Troubleshooting a Next.js app with ESLint - LogRocket Blog
In this article, I'm going to show you how to set up and troubleshoot with ESLint in a Next.js application. Setting up ESLint...
Read more >
Basic Features: ESLint - Next.js
js will automatically install eslint and eslint-config-next as development dependencies in your application and create an .eslintrc.json file in the root of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found