Skip to content

Module build failed. No ESLint configuration found. #2948

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Syler921 opened this issue Nov 13, 2018 · 18 comments
Closed

Module build failed. No ESLint configuration found. #2948

Syler921 opened this issue Nov 13, 2018 · 18 comments

Comments

@Syler921
Copy link

Syler921 commented Nov 13, 2018

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\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 )

@dousybox
Copy link

dousybox commented Nov 14, 2018

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!

@LinusBorg
Copy link
Member

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

@Syler921
Copy link
Author

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

@dousybox
Copy link

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

@haoqunjiang
Copy link
Member

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
Copy link
Author

@sodatea Thank you, it works.

@SirAuron
Copy link

SirAuron commented Apr 18, 2019

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

@trusktr
Copy link

trusktr commented Aug 16, 2019

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

@xxholly32
Copy link

it works ~~~~~

@davidquintard
Copy link

davidquintard commented Oct 24, 2019

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.

@2heal1
Copy link

2heal1 commented Nov 19, 2019

thanks

@HenryTSZ
Copy link

HenryTSZ commented Dec 9, 2019

@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

@karolsw3
Copy link

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!

@santiagofs
Copy link

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

@fireairforce
Copy link
Contributor

thx

@akashingole1
Copy link

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.

@pdsuwwz
Copy link

pdsuwwz commented Jun 11, 2021

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)

Amazing! I'm curious how it works 🧐

@defaye
Copy link

defaye commented Oct 15, 2021

Anyone know how to apply

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

for Nuxt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests