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

Created on 13 Nov 2018  路  16Comments  路  Source: vuejs/vue-cli

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! [email protected] build: vue-cli-service build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\stsankovAppData\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 )

Most helpful comment

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)

All 16 comments

Sorry, I don't know npm can install a local package before.

Could you please provide a small reporduction so we can debug this without trying to replicate this ourselves?

That would be very helpful, thanks!

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

@DousyBox - All my modules are in different Github repositories because they are reused in other projects. I cant import all of them through the way that you explain.

@LinusBorg - I have ignored the whole node_modules folder, but the build process fails again.

@Syler921 Just a small reporduction, not need the full version.

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)

@sodatea Thank you, it works.

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...

@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.

it works ~

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.
````

thanks

@pairmix I also met this problem, I because of the introduction of external js file, result in an error. If you want to introduce an external file, then the file must be in a project. So I finally built a project for external resources. I hope it can help you

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

thx

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chasegiunta picture chasegiunta  路  3Comments

Akryum picture Akryum  路  3Comments

csakis picture csakis  路  3Comments

miyamoto-san picture miyamoto-san  路  3Comments

BusyHe picture BusyHe  路  3Comments