有两种错误提示:
- TypeError: this.CliEngine is not a constructor
- packagePath is not defined
解决方法:
找到webstorm根目录,依次点开文件夹
安装目录\plugins\JavaScriptLanguage\languageService\eslint\bin\eslint-plugin.js
打开文件,找到下面的内容替换成:
1 2 3 4
| // 注释下面这行 // this.cliEngine = require(packagePath + "lib/cli-engine").CLIEngine; // 改为 this.cliEngine = require(this.basicPath + "lib/cli-engine").CLIEngine;
|
重启webstorm后,问题解决。