nx
nx copied to clipboard
Next app build failing due to eslint error - Plugin "react-hooks" was conflicted (Post update to 13.9.5 versions)
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
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
Its possibly unrelated, but it looks like storybook is a bit behind in your repo. Can you try running nx migrate @nrwl/[email protected]
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
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".
I am having the same issues with an npx create-next-app@latest
app
ERROR in Plugin "react" was conflicted between "package.e_modules\eslint-config-react-app\base.js" and "BaseConft-app\base.js". how can i fix it??
@writam-roy Have you tried using the latest Nx and Nextjs?
You could also remove plugin:@nrwl/nx/react-typescript
which should resolve the conflicts.
I can reproduce it on latest NX 14 version
Node : 16.14.0 OS : MacOS BigSur 11.3.1 pnpm : 6.32.12
nx : 14.1.7 next: 12.1.5 All nrwl versions 14.1.7 with react app (no angular) react: 18.1.0 typescript: 4.5.5
@ndcunningham Removing plugin:@nrwl/nx/react-typescript
from it didn't work for me.
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
I can reproduce on latest NX 14 version as well. Removing plugin:@nrwl/nx/react-typescript from it didn't work for me either.
Node: 16.14.2 OS: MacOS Monterey 12.3.1 yarn: 1.22.17
nx: 14.3.2 typescript: 4.7.2
@amacavei14 downgrading the following dependencies fixed it for me: "eslint-config-next": "12.1.6" -> "12.1.5" "eslint-plugin-react": "7.30.0" -> "7.29.4" "eslint-plugin-react-hooks": "4.5.0" -> "4.3.0"
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
This is still an issue, so commenting to prevent automatic closure.
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
I can reproduce on latest NX 14 version as well. Removing plugin:@nrwl/nx/react-typescript from it didn't work for me either.
Node: 16.14.2 OS: MacOS Monterey 12.3.1 yarn: 1.22.17
nx: 14.3.2 typescript: 4.7.2
@amacavei14 downgrading the following dependencies fixed it for me: "eslint-config-next": "12.1.6" -> "12.1.5" "eslint-plugin-react": "7.30.0" -> "7.29.4" "eslint-plugin-react-hooks": "4.5.0" -> "4.3.0"
This fixed my issue.
I tried, but it could not solve that error :( If anyone knows any solutions, please reply to help me. Thanks a lot.
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
This is still an issue, so commenting to prevent automatic closure.
Any idea how can i solve that ?
error - ESLint: Plugin "@next/next" was conflicted between ".eslintrc.json" and ".eslintrc.json » eslint-config-next/core-web-vitals » plugin:@next/next/core-web-vitals".
This error often happens if you have a 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"
}
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
Still an issue not stale
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏
Same here.
Same here
Same to me here. I'm currently using eslint-config-next: 13.1.3
Same here :(
I have only one .eslintrc.json
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.