TypeError: this.cliEngine is not a constructor
报错:
1 2 3 4 5 6 7 8 9 10 11 12 |
TypeError: this.cliEngine is not a constructor at ESLintPlugin.invokeESLint (/Applications/RubyMine.app/Contents/plugins/JavaScriptLanguage/languageService/eslint/bin/eslint-plugin.js:97:25) at ESLintPlugin.getErrors (/Applications/RubyMine.app/Contents/plugins/JavaScriptLanguage/languageService/eslint/bin/eslint-plugin.js:76:21) at ESLintPlugin.onMessage (/Applications/RubyMine.app/Contents/plugins/JavaScriptLanguage/languageService/eslint/bin/eslint-plugin.js:42:29) at Interface.<anonymous> (/Applications/RubyMine.app/Contents/plugins/JavaScriptLanguage/jsLanguageServicesImpl/js-language-service.js:105:39) at Interface.emit (events.js:189:13) at Interface._onLine (readline.js:290:10) at Interface._normalWrite (readline.js:433:12) at Socket.ondata (readline.js:149:10) at Socket.emit (events.js:189:13) at addChunk (_stream_readable.js:284:12) Process finished with exit code -1 |
修改这个文件/Applications/WebStorm.app/Contents/plugins/JavaScriptLanguage/languageService/eslint/bin/eslint-plugin.js
1 2 |
// this.cliEngine = require(packagePath + "lib/cli-engine"); this.cliEngine = require(packagePath + "lib/cli-engine").CLIEngine; |
重启webstorm/phpstorm就可以了