webstorm报错TypeError: this.cliEngine is not a constructor


点击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,搞定。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Awesome Ruby Toolbox Awesome A collection of awesome Ruby...
    debbbbie阅读 2,914评论 0 3
  • # Awesome Python [![Awesome](https://cdn.rawgit.com/sindr...
    emily_007阅读 2,227评论 0 3
  • !/usr/bin/env python -- coding: utf-8 -- '''根据某个traceId去调...
    小七奇奇阅读 635评论 0 0
  • 翠谷昨日放鸢, 此来凤林,不闻啼莺。 忽忆“蓼风轩”群芳斗草、 “珑翠庵”青灯已佛古、 海棠吟社“落红成阵”飘过…...
    摩羯星一号阅读 294评论 2 9
  • 听了道子的心商业的音频,我感觉到我一直没有找到我的那个(一),回首过往我一直自以为是的在补缺,哪里需要我不管我的心...
    王英钰涵阅读 245评论 0 0