Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ESLint couldn't determine the plugin "import" uniquely - React

I am getting the below error while running the Lint test in NextJS project.

ESLint: 7.32.0

ESLint couldn't determine the plugin "import" uniquely.

- /Library/...[FOLDER_PATH]..../node_modules/eslint-plugin-import/lib/index.js (loaded in ".eslintrc.json")
- /Library/...[FOLDER_PATH].../node_modules/eslint-config-next/node_modules/eslint-plugin-import/lib/index.js (loaded in ".eslintrc.json » eslint-config-next/core-web-vitals » /Library/...[FOLDER_PATH].../node_modules/eslint-config-next/index.js")

Please remove the "plugins" setting from either config or remove either plugin installation.

Earlier the lint test was working fine. Later, I updated the dependencies version with 'yarn upgrade' and started getting this error.

like image 529
Arvind Kushwaha Avatar asked Mar 25 '26 18:03

Arvind Kushwaha


1 Answers

Though --resolve-plugins-relative-to also worked, importing the resolver eslint-import-resolver-typescript seems to work better for NextJS with Typescript.

yarn add -D eslint-plugin-import eslint-import-resolver-typescript

or

npm i -D eslint-plugin-import eslint-import-resolver-typescript
like image 98
Arvind Kushwaha Avatar answered Mar 27 '26 10:03

Arvind Kushwaha



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!