vscode-eslint: Failed to load eslint library in v8

I CAN get eslint to work in my projects if I run:

npm i -D eslint@7.32.0

However, all of the newest versions of frameworks don’t support this version. Angular and Sveltekit, for example, now use the latest version 8.

I am using Windows 11 with Powershell. All of my projects give the same error.

In both my local .vsocde/settings.json and global settings.json file I have this:

    "eslint.alwaysShowStatus": true,
    "eslint.runtime": "",
    "eslint.validate": [
        "vue",
        "html",
        "javascript",
        "typescript",
        "javascriptreact",
        "typescriptreact"
    ],
    "editor.codeActionsOnSave": {
        "source.fixAll": true,
    },
    "eslint.workingDirectories": [
        {
            "mode": "auto"
        }
    ],
    "eslint.useESLintClass": true,
    "eslint.nodePath": "C:\\Users\\jdgam\\AppData\\Roaming\\npm\\node_modules"

I have uninstalled and reinstalled eslint gloabally npm i -g eslint.

No matter what I do, I still get this error even on a brand new clean project.

I have ESLint VS Code Extension v2.2.6 (latest).

eslint error

How can I get version 8 working on my Windows machine?

Thanks,

J

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (10 by maintainers)

Most upvoted comments

So I got it working. I uninstalled all of my VS Code extensions and reopened my projects. Everything works now. I do not know which specific plugin caused the issue.

Thank you guys for all of your help!

J