为了账号安全,请及时绑定邮箱和手机立即绑定

求解运行不起来单独的vue组件

报错信息如下

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.


正在回答

2 回答

同问,,试了网上的修改eslintrc.js配置文件还是不行,无法单组件调试

0 回复 有任何疑惑可以回复我~

你检查一下你写的代码是不是不符合es-lint的语法标准

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

求解运行不起来单独的vue组件

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信