Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebStorm 2018.1.4 + ESLint: TypeError: this.CliEngine is not a constructor

Tags:

My configuration is this.

WebStorm 2018.1.4; ESLint 6.4; Node 12.8; npm 6.10.2; Windows 8.1.

How do I eliminate the error in the thread title?

Here's a code sample.

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));
  }
};
like image 664
El Anonimo Avatar asked Sep 15 '19 13:09

El Anonimo


1 Answers

WEB-38922 is fixed in 2019.1.3. The issue is with ESLint version 6.x. If upgrading Webstorm is not an option for you, you have to downgrade to ESLint version 5:

npm install --save-dev eslint@5

Update: if you see similar error when working with ESLint 8, please make sure to upgrade to version 2021.2.2 where it's supported (see WEB-52236)

like image 164
lena Avatar answered Sep 27 '22 20:09

lena