question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: TypeError: this.cliEngine is not a constructor

See original GitHub issue

Environment

Node version: v14.17.0 npm version: 6.14.13 Local ESLint version: 8.0.1 Operating System: macOS Big Sur

What parser are you using?

vue-eslint-parser

What did you do?

I’m using Vue CLI & after upgrading ESlint from version 7.32.0 to 8.0.1 I get the error Syntax Error: TypeError: eslint.CLIEngine is not a constructor after launching the project for development with npm run serve.

// .eslintrc.js
module.exports = {
  root: true,
  env: {
    node: true
  },
  extends: ["plugin:vue/essential", "@vue/prettier"],
  rules: {
    "no-console": process.env.NODE_ENV === "production" ? "error" : "off",
    "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
  },
  parserOptions: {
    parser: "babel-eslint"
  }
};

What did you expect to happen?

Before upgrading ESlint, I was able to launch the project for development without issues.

What actually happened?

I got this error: Syntax Error: TypeError: eslint.CLIEngine is not a constructor & my code won’t compile for development.

Participation

~- [ ] I am willing to submit a pull request for this issue.~

Reproducible steps:

  • Install Vue CLI globally, run the command: npm install -g @vue/cli.
  • Create a project, run the command vue create todo-list-vue.
  • Navigate to the project & install the latest version of ESlint, run the command cd todo-list-vue && npm install eslint@latest.
  • Launch the project for development, run the command npm run serve.

You will get the following error in the console: Syntax Error: TypeError: eslint.CLIEngine is not a constructor

Screen Shot 2021-10-15 at 11 40 23 PM

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:14 (2 by maintainers)

github_iconTop GitHub Comments

15reactions
aladdin-addcommented, Oct 16, 2021

related: https://eslint.org/docs/8.0.0/user-guide/migrating-to-8.0.0#remove-cliengine

looks like vue-eslint-parser does not support eslint 8.0 yet. it is not maintained by the eslint team, you need to talk to its maintainers.

14reactions
cakcak27commented, Dec 16, 2021

i’m solved with installing eslint version 6.2.0 in dev dependencies

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebStorm 2018.1.4 + ESLint: TypeError: this.CliEngine is not ...
CliEngine is not a constructor balloon to appear and click "Details" ... with ESLint v6 in 2019.1 fails with an error 'TypeError: this....
Read more >
Linting with ESLint v6 in 2019.1 fails with an error 'TypeError
Error -Message: ESLint: TypeError: This.cliEngine is not a constructor. Please provide any additional information below. Attach a code sample as text, ...
Read more >
eslint/eslint - Gitter
I'm trying to create some custom rules, but my vue-cli-service build fails after creating a new eslint-plugin, with error TypeError: eslint.CLIEngine is not...
Read more >
Bug 1600113 - Bugzilla@Mozilla
... android-test An error occurred running eslint. Please check the following error messages: TypeError: CLIEngine is not a constructor at Object.execute ...
Read more >
TypeError: eslint.CLIEngine is not a constructor-Vue.js
Coding example for the question new VueJS project - eslint-loader - TypeError: eslint.CLIEngine is not a constructor-Vue.js.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found