Bug: TypeError: this.cliEngine is not a constructor
See original GitHub issueEnvironment
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 commandcd 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
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:14 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
related: https://eslint.org/docs/8.0.0/user-guide/migrating-to-8.0.0#remove-cliengine
looks like
vue-eslint-parserdoes not support eslint 8.0 yet. it is not maintained by the eslint team, you need to talk to its maintainers.i’m solved with installing eslint version 6.2.0 in dev dependencies