WebStorm 2018.1.4 + ESLint: TypeError: this.CliEngine is not a constructor
Here is another solution from Dmitry Babenko that will let you use ESLint 6.x with a fallback license of WebStorm:
- Wait for the
this.CliEngine is not a constructor
balloon to appear and click "Details"- Follow the first link in the stack-trace to
eslint-plugin.js
file- Find the following line at the top:
this.CliEngine = require(this.basicPath + "lib/cli-engine");
And replace it with the following one:this.CliEngine = require(this.basicPath).CLIEngine;
- Restart IDEA
WEB-38922 is fixed in 2019.1.3. The issue is with ESLint version 6.x. If upgrading Webstorm is not an option for you, you have to downgrade to ESLint version 5:
npm install --save-dev eslint@5
Update: if you see similar error when working with ESLint 8, please make sure to upgrade to version 2021.2.2 where it's supported (see WEB-52236)
In my Webstorm 2021.2 there is a slightly different error this.CliEngineCtor is not a constructor
.
That is related to updating eslint to 8.0.1.
Solution: update WebStorm to the latest version 2021.2.2 or later