我正在 WebStorm
中啟動(dòng)一個(gè)新的 VueJS
項(xiàng)目。我創(chuàng)建了一個(gè)新的 VueJS
項(xiàng)目,升級(jí)了 NPM
,添加了 Vuetify
,啟動(dòng)服務(wù)器后,它引發(fā)了此錯(cuò)誤:
ERROR Failed to compile with 1 errors 11:34:19 AM Module build failed (from ./node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js): TypeError: eslint.CLIEngine is not a constructor at Object.module.exports (/home/milano/WebstormProjects/xxx/node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js:223:27)
我該如何解決這個(gè)問(wèn)題?我應(yīng)該降級(jí) eslint
嗎?
ESLint 更新 2019.1.3 解決了此問(wèn)題。 查看此內(nèi)容
您可能需要:
升級(jí)您的 IDE 以獲取最新版本的 ESLint
或者升級(jí) ESLint
或者,此處有一個(gè) hack,其中涉及更新如何es-lint 已導(dǎo)入。例如:
改變
this.CliEngine = require(this.basicPath + "lib/cli-engine");
至
this.CliEngine = require(this.basicPath).CLIEngine;