vue-cli: Module build failed. No ESLint configuration found.

Version

3.0.0

Node and OS info

NodeJS - 9.5.0, Windows 10

Steps to reproduce

I have the following issue when i try to build my vue-cli 3.0 project :

Building for production…

ERROR Failed to compile with 1 errors
Module build failed (from ./node_modules/thread-loader/dist/cjs.js): Thread Loader (Worker 0) No ESLint configuration found.

at Config.getLocalConfigHierarchy (C:\_APP\projects\vuePreviewProject\vue-preview\node_modules\eslint\lib\config.js:255:39)
at Config.getConfigHierarchy (C:\_APP\projects\vuePreviewProject\vue-preview\node_modules\eslint\lib\config.js:179:43)
at Config.getConfigVector (C:\_APP\projects\vuePreviewProject\vue-preview\node_modules\eslint\lib\config.js:286:21)
at Config.getConfig (C:\_APP\projects\vuePreviewProject\vue-preview\node_modules\eslint\lib\config.js:329:29)
at processText (C:\_APP\projects\vuePreviewProject\vue-preview\node_modules\eslint\lib\cli-engine.js:163:33)
at CLIEngine.executeOnText (C:\_APP\projects\vuePreviewProject\vue-preview\node_modules\eslint\lib\cli-engine.js:620:17)
at lint (C:\_APP\projects\vuePreviewProject\vue-preview\node_modules\eslint-loader\index.js:253:17)
at transform (C:\_APP\projects\vuePreviewProject\vue-preview\node_modules\eslint-loader\index.js:231:18)
at C:\_APP\projects\vuePreviewProject\vue-preview\node_modules\loader-fs-cache\index.js:127:18
at ReadFileContext.callback (C:\_APP\projects\vuePreviewProject\vue-preview\node_modules\loader-fs-cache\index.js:31:14)

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. ERROR Build failed with errors. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! preview@0.1.0 build: vue-cli-service build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the preview@0.1.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\stsankov\AppData\Roaming\npm-cache_logs\2018-11-13T15_16_14_357Z-debug.log

Тhe problem occurs when i install one of the dependencies from my local machine ( not from github ) :

image

Аnyone who has encountered the problem ?

Thanks,

What is expected?

Successfull build

What is actually happening?

Error during the build process. ( vue-cli build )

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 15
  • Comments: 18 (3 by maintainers)

Commits related to this issue

Most upvoted comments

For linked modules, do this:

// vue.config.js
module.exports = {
  chainWebpack: config => config.resolve.symlinks(false)
}

(Note: there might be issues with HMR when symlinks is disabled)

@syler921 have you tried adding the path to an .eslintignore file?

Hi there, I get this issue with lastest vuejs install. I created a file vue.config.js with

module.exports = {
    chainWebpack: config => config.resolve.symlinks(false)
}

but it doesn’t work.

Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 0)
No ESLint configuration found.
    at PoolWorker.fromErrorObj (/home/gfp/Application/current/primo/node_modules/thread-loader/dist/WorkerPool.js:262:12)
    at Config.getLocalConfigHierarchy (/home/gfp/Application/current/primo/node_modules/eslint/lib/config.js:268:39)
    at Config.getConfigHierarchy (/home/gfp/Application/current/primo/node_modules/eslint/lib/config.js:192:43)
    at Config.getConfigVector (/home/gfp/Application/current/primo/node_modules/eslint/lib/config.js:299:21)
    at Config.getConfig (/home/gfp/Application/current/primo/node_modules/eslint/lib/config.js:342:29)
    at processText (/home/gfp/Application/current/primo/node_modules/eslint/lib/cli-engine.js:181:33)
    at CLIEngine.executeOnText (/home/gfp/Application/current/primo/node_modules/eslint/lib/cli-engine.js:690:40)
    at lint (/home/gfp/Application/current/primo/node_modules/eslint-loader/index.js:278:17)
    at transform (/home/gfp/Application/current/primo/node_modules/eslint-loader/index.js:252:18)
    at /home/gfp/Application/current/primo/node_modules/loader-fs-cache/index.js:127:18
    at ReadFileContext.callback (/home/gfp/Application/current/primo/node_modules/loader-fs-cache/index.js:31:14)

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.
 ERROR  Build failed with errors.

In my case there were these hidden files .babelrc, editorconfig, .eslintignore, .eslintrc.js and .postcssrc.js(in case you have installed bootstrap). These files were not commited so when I took pull these files were missing. I resolved my problem by copying back these files. Hope that helps.

@sodatea What’s the trick do? Can it break anything else that we should be aware of?

Seems like a hazard for people to blindly apply a change like that (people are going to try it without knowing the consequences), because it can affect other cases besides just “fixing” that eslint error.

For others who want to try a different solution, for me the one provided here (https://github.com/webpack-contrib/eslint-loader/issues/202) worked. Even tough I hope there is a better solution than these…

For linked modules, do this:

// vue.config.js
module.exports = {
  chainWebpack: config => config.resolve.symlinks(false)
}

(Note: there might be issues with HMR when symlinks is disabled)

You, sir, are an absolute magician. Thank you!

In my case, working with external files as well, solved the problem adding an .eslintrc.js file on the same folder of the external file

thanks