美文网首页
webstorm报错TypeError: this.cliEng

webstorm报错TypeError: this.cliEng

作者: Blue_Color | 来源:发表于2020-01-16 14:40 被阅读0次


    点击Details在控制台会显示报错的位置


    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

    “Ctrl+F”填写“lib/cli-engine”找到

     this.cliEngine = require(packagePath + "lib/cli-engine");

    在后面添上‘.CLIEngine’,即

    this.cliEngine =require(packagePath +"lib/cli-engine").CLIEngine;

    然后重启webstorm,OK,搞定。

    相关文章

      网友评论

          本文标题:webstorm报错TypeError: this.cliEng

          本文链接:https://www.haomeiwen.com/subject/urmfzctx.html