npm run serve 启动前端vue工程报错:Error: No ESLint configuration found

ERROR  Failed to compile with 1 errors                             下午12:10:41

Module build failed (from ./node_modules/eslint-loader/index.js):
Error: No ESLint configuration found in
/Users/tt/Downloads/fvking/src.
    at CascadingConfigArrayFactory._finalizeConfigArray (/Users/tim/Downloads/fvking/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:432:19)
    at CascadingConfigArrayFactory.getConfigArrayForFile (/Users/tim/Downloads/fvking/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:271:21)
    at CLIEngine.isPathIgnored (/Users/tim/Downloads/fvking/node_modules/eslint/lib/cli-engine/cli-engine.js:951:18)
    at CLIEngine.executeOnText (/Users/tim/Downloads/fvking/node_modules/eslint/lib/cli-engine/cli-engine.js:868:38)
    at lint (/Users/tim/Downloads/fvking/node_modules/eslint-loader/index.js:278:17)
    at transform (/Users/tim/Downloads/fvking/node_modules/eslint-loader/index.js:252:18)
    at /Users/tim/Downloads/fvking/node_modules/loader-fs-cache/index.js:127:18
    at ReadFileContext.callback (/Users/tim/Downloads/fvking/node_modules/loader-fs-cache/index.js:31:14)
    at FSReqCallback.readFileAfterOpen [as oncomplete] (node:fs:284: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.

 

解决方法:
          进入项目根目录执行如下命令
          npm init -y
          npm install eslint --save-dev
          ./node_modules/.bin/eslint --init
           npm run serve 启动前端vue工程报错:Error: No ESLint configuration found_第1张图片

 

再次启动工程:npm run serve ,成功访问。。。

你可能感兴趣的:(从零学习搭建物联网中台,vue.js,css,javascript,es6)