lvlvo
2020-02-20 11:59
报错信息如下
PS F:\vuework\vueclidemo> vue serve src/views/Demo.vue
There's a package.json in the current directory.
Did you mean npm run serve?
INFO Starting development server...
98% after emitting CopyPlugin
ERROR Failed to compile with 1 errors 11:55:00
Module build failed (from E:/Program Files (x86)/nodejs/node_global/node_modules/@vue/cli-service-global/node_modules/eslint-loader/index.js):
Error: BaseConfig:
Configuration for rule "no-debugger" is invalid:
Severity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '"process.env.NODE_ENV === "production" ? "error" : "off""').
at validateRuleOptions (F:\vuework\vueclidemo\node_modules\eslint\lib\shared\config-validator.js:138:19)
at F:\vuework\vueclidemo\node_modules\eslint\lib\shared\config-validator.js:193:9
at Array.forEach (<anonymous>)
at validateRules (F:\vuework\vueclidemo\node_modules\eslint\lib\shared\config-validator.js:190:30)
at validateConfigArray (F:\vuework\vueclidemo\node_modules\eslint\lib\shared\config-validator.js:337:9)
at CascadingConfigArrayFactory._finalizeConfigArray (F:\vuework\vueclidemo\node_modules\eslint\lib\cli-engine\cascading-config-array-factory.js:417:13)
at CascadingConfigArrayFactory.getConfigArrayForFile (F:\vuework\vueclidemo\node_modules\eslint\lib\cli-engine\cascading-config-array-factory.js:271:21)
at CLIEngine.isPathIgnored (F:\vuework\vueclidemo\node_modules\eslint\lib\cli-engine\cli-engine.js:951:18)
at CLIEngine.executeOnText (F:\vuework\vueclidemo\node_modules\eslint\lib\cli-engine\cli-engine.js:868:38)
at lint (E:\Program Files (x86)\nodejs\node_global\node_modules\@vue\cli-service-global\node_modules\eslint-loader\index.js:278:17)
at transform (E:\Program Files (x86)\nodejs\node_global\node_modules\@vue\cli-service-global\node_modules\eslint-loader\index.js:252:18)
at E:\Program Files (x86)\nodejs\node_global\node_modules\@vue\cli-service-global\node_modules\loader-fs-cache\index.js:127:18
at ReadFileContext.callback (E:\Program Files (x86)\nodejs\node_global\node_modules\@vue\cli-service-global\node_modules\loader-fs-cache\index.js:31:14)
at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:239:13)
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
同问,,试了网上的修改eslintrc.js配置文件还是不行,无法单组件调试
你检查一下你写的代码是不是不符合es-lint的语法标准
3小时速成 Vue2.x 核心技术
82578 学习 · 489 问题
相似问题