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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With