Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/date/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
WebStorm 2018.1.4+;ESLint:TypeError:this.CliEngine不是构造函数_Webstorm_Eslint - Fatal编程技术网

WebStorm 2018.1.4+;ESLint:TypeError:this.CliEngine不是构造函数

WebStorm 2018.1.4+;ESLint:TypeError:this.CliEngine不是构造函数,webstorm,eslint,Webstorm,Eslint,我的配置是这样的 WebStorm 2018.1.4;ESLint 6.4;节点12.8;npm 6.10.2;windows8.1 如何消除线程标题中的错误 这是一个代码示例 import { GET_DAILY_SUCCESS, GET_HOURLY_SUCCESS, GET_MINUTE_SUCCESS } from './types'; import { getDailyToUsd, getHourlyToUsd, getMinuteToUsd } from '.

我的配置是这样的

WebStorm 2018.1.4;ESLint 6.4;节点12.8;npm 6.10.2;windows8.1

如何消除线程标题中的错误

这是一个代码示例

import {
  GET_DAILY_SUCCESS,
  GET_HOURLY_SUCCESS,
  GET_MINUTE_SUCCESS
} from './types';
import {
  getDailyToUsd,
  getHourlyToUsd,
  getMinuteToUsd
} from '../api/cryptocompare';
import { setError } from './error';

export const getDaily = (fsym = 'BTC') => async dispatch => {
  try {
    const list = await getDailyToUsd(fsym);

    dispatch({
      type: GET_DAILY_SUCCESS,
      currency: fsym,
      list
    });
  } catch(err) {
    dispatch(setError(err.Message));
  }
};
固定在2019.1.3。 问题在于ESLint版本6.x。如果升级Webstorm不是您的选择,您必须降级到ESLint版本5:

npm install --save-dev eslint@5
下面是另一个允许您将ESLint 6.x与WebStorm的回退许可证一起使用的版本:

  • 等待
    this.CliEngine不是构造函数
    引出序号出现,然后单击“详细信息”
  • 按照堆栈跟踪中的第一个链接进入
    eslint plugin.js
    文件
  • 在顶部找到以下行:
    this.CliEngine=require(this.basicPath+“lib/cli引擎”)
    并将其替换为以下内容:
    this.CliEngine=require(this.basicPath).CliEngine
  • 重新开始的想法

工作完美