ERROR in [eslint] Failed to load plugin 'eslint-plugin-react-refresh'

61 views Asked by At

'.eslintrc.cjs': Cannot find module 'eslint-plugin-react-refresh' Require stack:

  • C:\Users\janan\OneDrive\Desktop\dukaan\nishyan\node_modules\react-scripts\config_placeholder_.js

even if i add 'eslint-plugin-react-refresh' in plugins , it shows same error. i tried , npm install eslint-plugin-react-refresh --save-dev npm start

I Checked my Node modules and reinstalled them. it didn't work

 module.exports = {
  root: true,
  env: {`enter code here`
    browser: true,
    es2020: true,
  },
  extends: [
    "eslint:recommended",
    "plugin:react/recommended",
    "plugin:react/jsx-runtime",
    "plugin:react-hooks/recommended",
  ],
  ignorePatterns: ["dist"],
  parserOptions: {
    ecmaVersion: "latest",
    sourceType: "module",
  },
  settings: {
    react: {
      version: "detect",
    },
  },
  plugins: ["react", "react-hooks", "react-refresh"],
  rules: {
    "react-refresh/only-export-components": [
      "warn",
      { allowConstantExport: true },
    ],
  },
};
0

There are 0 answers