WebStorm 2020 ESLint: TypeError: this.CliEngine is not a constructor

Viewed 448

My configuration is WebStorm 2020.2.3, ESLint 8.11.0, Node.js v16.14.2.

Getting the ESLint: TypeError: this.CliEngine is not a constructor error while opening .js files: enter image description here

Searching for WebStorm ESLint: TypeError: this.CliEngine is not a constructor on Google and StackOverflow, and going through answers people give, such as manually editing lines in Webstorm did not help me to solve this issue on this version of WebStorm - 2020.2.3.

This question is not a duplicate of WebStorm 2018.1.4 + ESLint: TypeError: this.CliEngine is not a constructor. Different version of the IDE and the bug is different in a different place, the code in the file is different.

2 Answers

ESLint 8 is supported since 2021.2.2, see WEB-52236; please consider updating the IDE

The way I managed to solve this issue on WebStorm 2020 without updating to a newer version:

  • Install older than 8.0.0 version of eslint anywhere on your machine using any method you like. I installed version 7.32.0 globally with npm: npm install -g eslint@7.32.0.
  • Go to Settings > Languages & Frameworks > JavaScript > Code and Quality Tools > ESLint. Select Manual ESLint Configuration and select the version older than 8.0.0:

enter image description here

Related