Skip to content
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

New vue-cli application fails to compile due to eslint-loader #4231

Closed
lbicknese opened this issue Jul 3, 2019 · 44 comments · Fixed by #4233
Closed

New vue-cli application fails to compile due to eslint-loader #4231

lbicknese opened this issue Jul 3, 2019 · 44 comments · Fixed by #4233

Comments

@lbicknese
Copy link

Version

3.9.0

Environment info

Environment Info:

  System:
    OS: macOS Sierra 10.12.6
    CPU: (4) x64 Intel(R) Core(TM) i5-6287U CPU @ 3.10GHz
  Binaries:
    Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
    Yarn: 1.13.0 - /usr/local/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v10.15.3/bin/npm
  Browsers:
    Chrome: 75.0.3770.100
    Firefox: 67.0.4
    Safari: 12.1.1
  npmPackages:
    @vue/babel-helper-vue-jsx-merge-props:  1.0.0 
    @vue/babel-plugin-transform-vue-jsx:  1.0.0 
    @vue/babel-preset-app:  3.9.0 
    @vue/babel-preset-jsx:  1.0.0 
    @vue/babel-sugar-functional-vue:  1.0.0 
    @vue/babel-sugar-inject-h:  1.0.0 
    @vue/babel-sugar-v-model:  1.0.0 
    @vue/babel-sugar-v-on:  1.0.0 
    @vue/cli-overlay:  3.9.0 
    @vue/cli-plugin-babel: ^3.9.0 => 3.9.0 
    @vue/cli-plugin-eslint: ^3.9.0 => 3.9.0 
    @vue/cli-service: ^3.9.0 => 3.9.0 
    @vue/cli-shared-utils:  3.9.0 
    @vue/component-compiler-utils:  2.6.0 
    @vue/preload-webpack-plugin:  1.1.0 
    @vue/web-component-wrapper:  1.2.0 
    eslint-plugin-vue: ^5.0.0 => 5.2.3 (4.7.1)
    vue: ^2.6.10 => 2.6.10 
    vue-eslint-parser:  2.0.3 (5.0.0)
    vue-hot-reload-api:  2.3.3 
    vue-loader:  15.7.0 
    vue-router: ^3.0.3 => 3.0.7 
    vue-style-loader:  4.1.2 
    vue-template-compiler: ^2.6.10 => 2.6.10 
    vue-template-es2015-compiler:  1.9.1 
    vuex: ^3.0.1 => 3.1.1 
  npmGlobalPackages:
    @vue/cli: 3.9.0

Steps to reproduce

>vue create new-app
>cd new-app
>npm run serve

What is expected?

INFO  Starting development server...
 98% after emitting CopyPlugin                                                .  
 DONE  Compiled successfully in 3435ms                               10:02:58 AM

 
  App running at:
  - Local:   http://localhost:8080/ 
  - Network: http://10.145.82.231:8080/

  Note that the development build is not optimized.
  To create a production build, run npm run build.

What is actually happening?

INFO  Starting development server...
 98% after emitting CopyPlugin                                                 

 ERROR  Failed to compile with 1 errors                               9:53:57 AM

Module build failed (from ./node_modules/eslint-loader/index.js):
Error: Cannot find module '.../node_modules/eslint/lib/api.js/package.json'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.module.exports (.../node_modules/eslint-loader/index.js:170:23)

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.

This is from a clean instantiation of a vue-cli application. No additional configuration to webpack or eslint. It had been working previously, so I'm thinking it could be a issue caused by a minor update to a dependency. Somewhere eslint-loader is getting a user defined eslint package path that does not exist.

@zopu
Copy link

zopu commented Jul 3, 2019

Seeing the same issue here.

@cgcgbcbc
Copy link

cgcgbcbc commented Jul 3, 2019

Tried version 3.4.1 and 3.9.0, same issue.
If creating a project without babel and linter, the issue is gone.

@luisacatherine
Copy link

same issue here

@TGilany
Copy link

TGilany commented Jul 3, 2019

Same issue here when upgrading from 3.6.0 to 3.9.0
Also happen in 3.7.0

@alessandrotesoro
Copy link

Same here.

@ikitozen
Copy link

ikitozen commented Jul 3, 2019

same issue here,
fixed by freezing eslint-loader to version 2.1.2 for now

Looks like a eslint-loader 2.2.0 issue
webpack-contrib/eslint-loader@b6c3938

@maxql
Copy link

maxql commented Jul 3, 2019

As @ikitozen mentioned

"resolutions": { "eslint-loader": "2.1.2" }

in package.json seems to do the trick.

@rdhelms
Copy link

rdhelms commented Jul 3, 2019

For anyone else diving into it, I think it's related to this change in eslint-loader that was meant to help support eslint 6. It's adding /package.json in situations where the userEslintPath seems to already be a file rather than a directory. This is resulting in eslint-loader trying to find the .../api.js/package.json path.

webpack-contrib/eslint-loader@b6c3938#diff-168726dbe96b3ce427e7fedce31bb0bcR167

@rdhelms
Copy link

rdhelms commented Jul 3, 2019

And [email protected] was published a couple hours ago

@alessandrotesoro
Copy link

@maxql solution seems to work for now, thank you 👍

@lifanmvc
Copy link

lifanmvc commented Jul 3, 2019

更新到 3.9.0后,创建的项目,执行:
npm run serve,出现下面错误:

Module build failed (from ./node_modules/eslint-loader/index.js):
Error: Cannot find module '.../node_modules/eslint/lib/api.js/package.json'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.module.exports (.../node_modules/eslint-loader/index.js:170:23)

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.

怎么解决啊。

-- it's ok
npm i [email protected]

@gerenook
Copy link

gerenook commented Jul 3, 2019

@maxql only works with yarn, not npm

@maxql
Copy link

maxql commented Jul 3, 2019

@maxql only works with yarn, not npm

For npm users it should just be npm i [email protected] right?

@pasqualevitiello
Copy link

@maxql only works with yarn, not npm

For npm users it should just be npm i [email protected] right?

Yes, that's for npm.

@donley828
Copy link

Same here.

@purplelady105
Copy link

purplelady105 commented Jul 3, 2019

Also receiving this compile error after updating to v.3.9.0. Reverted to [email protected] per @maxql's response.

@m-ahmadi
Copy link

m-ahmadi commented Jul 3, 2019

Same issue here as well.
I created an issue similar to this one but on the vuejs/vue repository which I was told to come here.

OS: Windows 7 Ultimate Service Pack 1
node -v: v8.11.3
npm -v: 6.9.0
vue -V: 3.9.0

vi

npm run serve

> [email protected] serve E:\xampp\htdocs\testvue2
> vue-cli-service serve

 INFO  Starting development server...
 98% after emitting CopyPlugin

 ERROR  Failed to compile with 1 errors


Module build failed (from ./node_modules/eslint-loader/index.js):
Error: Cannot find module 'E:\xampp\htdocs\testvue2\node_modules\eslint\lib\api.js/package.json'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at Object.module.exports (E:\xampp\htdocs\testvue2\node_modules\eslint-loader\index.js:170:23)

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.

@luxwarp
Copy link

luxwarp commented Jul 3, 2019

same problem here ofc after update! Works by doing npm i [email protected]. Looking forward to fix! :)

@tsathis
Copy link

tsathis commented Jul 3, 2019

not fixed by npm i [email protected]

@richardtallent
Copy link

I was able to fix the Vue UI "serve" task by downgrading to eslint-loader 2.1.2 as explained above. However, now I'm getting a "build" error:

Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 0)
Cannot find module 'eslint/lib/formatters/stylish'
    at PoolWorker.fromErrorObj (C:\Temp\VS\Client\foo\node_modules\thread-loader\dist\WorkerPool.js:258:12)
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.module.exports (C:\Temp\VS\Client\foo\node_modules\eslint-loader\index.js:196:28)

I'm using eslint 6, if that matters.

@LinusBorg
Copy link
Member

you will have to remove /node_modules and package-lock.json first, then add e:
slint-loader to your package.json as a devDependency:

"devDependencies": {
  "eslint-loader": "2.1.2" // note this strict version, not "^2.1.2"
}

then run npm install again and this time, the cli-plugin-eslint should end up with the older, working version.

Once eslint-loader has been fixed you can remove that dependency, and reinstall all packages again.

@crholliday
Copy link

I am getting the below:

Module build failed (from ./node_modules/eslint-loader/index.js):
TypeError: ruleMapper is not a function
"dependencies": {
    "apollo-link-http": "^1.5.16",
    "apollo-link-ws": "^1.0.19",
    "apollo-utilities": "^1.3.3",
    "date-fns": "^1.30.1",
    "register-service-worker": "^1.6.2",
    "vee-validate": "^2.2.15",
    "vue": "^2.6.11",
    "vue-apollo": "^3.0.2",
    "vue-router": "^3.1.3",
    "vue-sweetalert2": "^1.6.4",
    "vue2-filters": "^0.4.1",
    "vuex": "^3.1.2"
  },
  "devDependencies": {
    "@fortawesome/fontawesome-svg-core": "^1.2.26",
    "@fortawesome/free-regular-svg-icons": "^5.12.0",
    "@fortawesome/free-solid-svg-icons": "^5.12.0",
    "@fortawesome/vue-fontawesome": "^0.1.9",
    "@vue/cli-plugin-babel": "^3.12.1",
    "@vue/cli-plugin-eslint": "^3.12.1",
    "@vue/cli-plugin-pwa": "^3.12.1",
    "@vue/cli-service": "^4.1.2",
    "@vue/eslint-config-standard": "^4.0.0",
    "babel-eslint": "^10.0.3",
    "eslint": "^5.16.0",
    "eslint-plugin-vue": "^5.2.3",
    "graphql-tag": "^2.10.1",
    "jwt-decode": "^2.2.0",
    "node-sass": "^4.13.0",
    "sass-loader": "^7.3.1",
    "vue-cli-plugin-apollo": "^0.19.2",
    "vue-cli-plugin-pug": "^1.0.7",
    "vue-template-compiler": "^2.6.11"
  },

Is this the same problem? Looks like my eslint is still a 5.* ?

@haoqunjiang
Copy link
Member

@crholliday I don't think it's the same problem.
Based on the error message, here's the only issue that I can find on the web: eslint/eslint#11578 Maybe it's a installation problem.

lcolok added a commit to lcolok/smc that referenced this issue Jan 21, 2020
@petrovich-ivan
Copy link

thank you!

@petrovich-ivan
Copy link

I have an issue such as below
Module Error (from ./node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js):
How can I solve this problem?
I wish your kind advice, thank you!

@ayZagen
Copy link

ayZagen commented Mar 5, 2020

@petrovich-ivan use "eslint": "^5"

@LautaroVarela
Copy link

Finally, i found the correct way is setting lintOnSave: false.

//vue.config.js
module.exports = {
  lintOnSave: false,
}

Here is the quote from official docs:

When set to true or 'warning', eslint-loader will emit lint errors as warnings. By default, warnings are only logged to the terminal and does not fail the compilation, so this is a good default for development.

hi, where´s the vue.config.js?

@richardtallent
Copy link

hi, where´s the vue.config.js?

It's an optional file, so you'd create it yourself in the same folder as your package.json. Deets here:

https://cli.vuejs.org/config/#vue-config-js

yamelsenih added a commit to adempiere/adempiere-vue that referenced this issue Jun 19, 2020
* chore: remove i18n (#1828)

* [release] 4.1.0

* perf[Profile]: adapt the profile page to the mobile (PanJiaChen#2020)

* Revert "perf: optimize page scrolling when setting fixedHeader"

This reverts commit e8e6c7e.

* perf[Style]: refine fixed-header style when open el-dialog

* doc: add new article

* chore: use mockjs in production environment

* fix[sidebar.css]: remove redundant css

* perf[style]: refine dashboard style in mobile (PanJiaChen#2060)

* feat[ErrorLog]: add a clear button in ErrorLog component (PanJiaChen#2065)

* fix[redirect]: fix redirect bug in vue-devtools (PanJiaChen#2066)

* perf[Tinymce]: update tinymce cdn version

* fix[redirect]: fix redirect bug in vue-devtool again

* docs: add support to readme for Spanish (PanJiaChen#2070)

* docs[es]: add some translation(PanJiaChen#2080)

* perf[Exapme]: set page title  according to article id

* perf[RightPanel]: tidy css (PanJiaChen#2101)

* feat[SvgIcon]: support import svg from url (PanJiaChen#2052)

* fix: fixed change roles bug (PanJiaChen#2072)

* perf[Breadcrumb]: do not update breadcrumbs when go to redirect page (PanJiaChen#2086)

* perf[store]: add support to sub-modules (PanJiaChen#2047)

* perf[Login]: support other query (PanJiaChen#2013)

* refactor[chore]: generate postcss.config.js instead of .postcssrc.js

consistent with vue-cli

* perf[Tinymce]: dynamic import tinymce(PanJiaChen#2102)

* [release] 4.2.0

* docs: add support to readme for Spanish (PanJiaChen#2070)

* docs[es]: add some translation(PanJiaChen#2080)

* perf[Exapme]: set page title  according to article id

* perf[RightPanel]: tidy css (PanJiaChen#2101)

* feat[SvgIcon]: support import svg from url (PanJiaChen#2052)

* fix: fixed change roles bug (PanJiaChen#2072)

* perf[Breadcrumb]: do not update breadcrumbs when go to redirect page (PanJiaChen#2086)

* perf[store]: add support to sub-modules (PanJiaChen#2047)

* perf[Login]: support other query (PanJiaChen#2013)

* refactor[chore]: generate postcss.config.js instead of .postcssrc.js

consistent with vue-cli

* perf[Tinymce]: dynamic import tinymce(PanJiaChen#2102)

* [release] 4.2.0

* perf[Style]: refine example css

* fix[Chart]: fixed chart bug in keep-alive (PanJiaChen#2119)

* perf[Style]: refine example css

* fix[Chart]: fixed chart bug in keep-alive (PanJiaChen#2119)

* Create FUNDING.yml

* chore: set localhost => 127.0.0.1 (PanJiaChen#2142)

* update github ISSUE_TEMPLATE

* chore: add autoprefixer to devDependencies

* perf[Tinymce]: add language option (PanJiaChen#2159)

* fix[Tinymce]: fixed bug when init multiple tinymces at the same time (PanJiaChen#2152)

* feat: add tab url demo (PanJiaChen#2114)

* perf[request.js]: refine error reject (PanJiaChen#2160)

* [release] 4.2.1

* Create FUNDING.yml

* chore: set localhost => 127.0.0.1 (PanJiaChen#2142)

* update github ISSUE_TEMPLATE

* chore: add autoprefixer to devDependencies

* fix[Tinymce]: fixed bug when init multiple tinymces at the same time (PanJiaChen#2152)

* feat: add tab url demo (PanJiaChen#2114)

* perf[request.js]: refine error reject (PanJiaChen#2160)

* [release] 4.2.1

* perf: default not set withCredentials

* fix[ImageCropper]: removeEventListener when destroyed(PanJiaChen#2169)

* docs: fix typo (PanJiaChen#2170)

* fix: input attribute autocomplete error (PanJiaChen#2191)

* perf: default not set withCredentials

* fix[ImageCropper]: removeEventListener when destroyed(PanJiaChen#2169)

* docs: fix typo (PanJiaChen#2170)

* fix: input attribute autocomplete error (PanJiaChen#2191)

* perf[PanThumb]: Replace the image tag with background-image to prevent the stretching (PanJiaChen#2202)

* docs: fix typo README.zh-CN.md (PanJiaChen#2283)

修改错别字

* perf[clipboard.js]: remove redundant code (PanJiaChen#2307)

* bump:  update axios for security vulnerability

* bump: update @vue/cli-plugin-eslint version (PanJiaChen#2327)

FIx  cannot find module '.../node_modules/eslint/lib/api.js/package.json' bug,see vuejs/vue-cli#4231.

* chore: allow dynamic set port

* fix[complex-table]: form header sort icon is out of sync (PanJiaChen#2382)

* fix: fixed missing icons

* fix: typos (PanJiaChen#2532)

Role Nmae => Role Name

* docs: add awesome-project

* fix[Dashboard]: fixed debounce bug (PanJiaChen#2586) (PanJiaChen#2597)

To fixed PanJiaChen#2586

* perf: VS Code support webpack alias file jump (PanJiaChen#2609)

* perf: optimize import file-saver way(PanJiaChen#2347)

* refactor[ImageCropper]: fix lint error (PanJiaChen#2365)

* fix: fixed numberFormatter  bug

PanJiaChen#2568

* fix[example]: fixed create.vue cache error

PanJiaChen#2608

* perf[utils.js]: perf parseTime function (PanJiaChen#2625)

* perf[tagsView]: pref DEL_CACHED_VIEW and DEL_OTHERS_CACHED_VIEWS function (PanJiaChen#2626)

* fix[tagsView]: fixed DEL_OTHERS_CACHED_VIEWS bug

* fix[logout]: empty tagsview when logout (PanJiaChen#2632)

* fix[TagsView]: fixed toLastView bug (PanJiaChen#2634)

* perf[SvgIcon]: change xlink:href to href(PanJiaChen#2645)

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href

* fix[TagsView]: fixed click.middle can close affixed tag bug (PanJiaChen#2649)

* docs: add job ad

* perf[PanThumb]: Replace the image tag with background-image to prevent the stretching (PanJiaChen#2202)

* docs: fix typo README.zh-CN.md (PanJiaChen#2283)

修改错别字

* perf[clipboard.js]: remove redundant code (PanJiaChen#2307)

* bump:  update axios for security vulnerability

* bump: update @vue/cli-plugin-eslint version (PanJiaChen#2327)

FIx  cannot find module '.../node_modules/eslint/lib/api.js/package.json' bug,see vuejs/vue-cli#4231.

* chore: allow dynamic set port

* fix[complex-table]: form header sort icon is out of sync (PanJiaChen#2382)

* fix: fixed missing icons

* fix: typos (PanJiaChen#2532)

Role Nmae => Role Name

* docs: add awesome-project

* fix[Dashboard]: fixed debounce bug (PanJiaChen#2586) (PanJiaChen#2597)

To fixed PanJiaChen#2586

* perf: VS Code support webpack alias file jump (PanJiaChen#2609)

* perf: optimize import file-saver way(PanJiaChen#2347)

* refactor[ImageCropper]: fix lint error (PanJiaChen#2365)

* fix: fixed numberFormatter  bug

PanJiaChen#2568

* fix[example]: fixed create.vue cache error

PanJiaChen#2608

* perf[utils.js]: perf parseTime function (PanJiaChen#2625)

* perf[tagsView]: pref DEL_CACHED_VIEW and DEL_OTHERS_CACHED_VIEWS function (PanJiaChen#2626)

* fix[tagsView]: fixed DEL_OTHERS_CACHED_VIEWS bug

* fix[logout]: empty tagsview when logout (PanJiaChen#2632)

* fix[TagsView]: fixed toLastView bug (PanJiaChen#2634)

* perf[SvgIcon]: change xlink:href to href(PanJiaChen#2645)

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href

* fix[TagsView]: fixed click.middle can close affixed tag bug (PanJiaChen#2649)

* docs: add job ad

* feat: add job

* docs: improved README.md (PanJiaChen#2656)

* style: fix el-date-picker css style

* perf: format dropdown menu code (PanJiaChen#2720)

* perf: format inline edit table (PanJiaChen#2725)

move one format `{row}`

* perf: format drag table (PanJiaChen#2733)

move one format `{row}`

* perf: complex table (PanJiaChen#2732)

* perf: text i18n (PanJiaChen#2739)

* update 'MarkdownEditor' components name

* format: space in user card (PanJiaChen#2744)

* perf: format pdf download (PanJiaChen#2791)

* perf[views/icons]: use grid (PanJiaChen#2803)

* feat: plop new generate store (PanJiaChen#2805)

* fix[icons]:fixed eslint 1 error and 2 warnings (PanJiaChen#2835)

* perf[documentation]:  refine css

* fix[Logout]: click blank area of ​​dropDown able to logout (PanJiaChen#2896)

* perf: import mockXHR only in production (PanJiaChen#2910)

* 自动排除mock

生产环境,使用webpack的条件编译自动排除mock数据

* perf: refine

Co-authored-by: 花裤衩 <[email protected]>

* perf[Menu]: remove unused menu-wrapper (PanJiaChen#2903)

* perf[complex-table]:refine code (PanJiaChen#2825)

* perf: optimize checkCapslock method (PanJiaChen#2635)

* optimize checkCapslock method

* update

Co-authored-by: 花裤衩 <[email protected]>

* fix[Charts]: fix charts resize in keep-alive bug (PanJiaChen#2922)

* fix[Charts]: fix charts resize in keep-alive bug

* refine

* fix: fixed mock server (PanJiaChen#2929)

* init

* refine

* update

* bump: update element-ui version

* fix: fixed require mock bug in production

* feat[Search]: route search supports pinyin (PanJiaChen#2643)

* fix: fixed redirect path regex (PanJiaChen#2933)

* perf[Mock]: set responseFake to mock-server.js(PanJiaChen#2966)

* modify 把mock/index.js中与mock-server相关的代码转移到mock-server.js中去,实现两则功能分割

* docs: improve Japanese translation (PanJiaChen#2970)

* perf: change script-loader to dependencies

* fix[profile/UserCard]: fixed wrong key name (PanJiaChen#3056)

roles => role

* fix:fixed parseTime bug in ie and safari(PanJiaChen#3066)

* /src/utils/index.js parseTime 添加IE浏览器(版本10以下,包括版本10)兼容。

* perf: update

Co-authored-by: aisen60 <[email protected]>
Co-authored-by: 花裤衩 <[email protected]>

* perf: format component names as PascalCase (PanJiaChen#3074)

format: component names should be PascalCase

* docs: add smallsticker

* Update README.zh-CN.md

* fix: svg support old broswer (PanJiaChen#3085)

* fixed typo (PanJiaChen#3091)

* fix: use vue-cli default source-map (PanJiaChen#3097)

cheap-module-eval-source-map

* perf[Tinymce]: editor try to keep these URLs intact (PanJiaChen#3141)

* fix[element-variables]: missing space in element-variables (PanJiaChen#3144)

* fix: compatibility with vetur (#1700)

* feat: add option to try project on CodeSandbox (PanJiaChen#2976)

* docs: add tips

* perf: when tags-view scroll close the right-menu

* fix[parseTime]: fixed when pass null (PanJiaChen#3038)

* fix[css]: min btn width (PanJiaChen#3164)

* Add contributor into package.json file.

* fixed before merge.

Co-authored-by: 花裤衩 <[email protected]>
Co-authored-by: toruksmakto <[email protected]>
Co-authored-by: Yamel Senih <[email protected]>
Co-authored-by: Yamel Senih <[email protected]>
Co-authored-by: liugq <[email protected]>
Co-authored-by: bpzhang <[email protected]>
Co-authored-by: Serge <[email protected]>
Co-authored-by: MaYuanhai <[email protected]>
Co-authored-by: Jessynt <[email protected]>
Co-authored-by: 肖敏 <[email protected]>
Co-authored-by: TinaryTree <[email protected]>
Co-authored-by: itsccn <[email protected]>
Co-authored-by: why <[email protected]>
Co-authored-by: Baskerville* <[email protected]>
Co-authored-by: Francis <[email protected]>
Co-authored-by: monkeycf <[email protected]>
Co-authored-by: BradyBromley <[email protected]>
Co-authored-by: Phạm Ngọc Hòa <[email protected]>
Co-authored-by: bbigcd <[email protected]>
Co-authored-by: xuanzai <[email protected]>
Co-authored-by: flitrue <[email protected]>
Co-authored-by: 韬 <[email protected]>
Co-authored-by: 任羽飞 <[email protected]>
Co-authored-by: Kaitian Xie <[email protected]>
Co-authored-by: AndyLZC/AndyLZC.github.io <[email protected]>
Co-authored-by: RussXD <[email protected]>
Co-authored-by: 李小斐 <[email protected]>
Co-authored-by: RoBlues <[email protected]>
Co-authored-by: Shota Aratono <[email protected]>
Co-authored-by: echofly <[email protected]>
Co-authored-by: Aisen60 <[email protected]>
Co-authored-by: aisen60 <[email protected]>
Co-authored-by: Alex S <[email protected]>
Co-authored-by: Aisen <[email protected]>
Co-authored-by: ntnyq <[email protected]>
Co-authored-by: garethx <[email protected]>
Co-authored-by: AiMe1991 <[email protected]>
Co-authored-by: cooper <[email protected]>
Co-authored-by: Nickbing Lao <[email protected]>
@alinaberlin
Copy link

@maxql only works with yarn, not npm

For npm users it should just be npm i [email protected] right?

It was working for me with npm i eslint-loader. Thank you!!!!

@eliasaparecido
Copy link

Finally, i found the correct way is setting lintOnSave: false.

//vue.config.js
module.exports = {
  lintOnSave: false,
}

Here is the quote from official docs:

When set to true or 'warning', eslint-loader will emit lint errors as warnings. By default, warnings are only logged to the terminal and does not fail the compilation, so this is a good default for development.

hi, where´s the vue.config.js?

it's work with me

@bsor-dev
Copy link

For nuxt users and encountered this error, if you don't need eslint and want to save time. Just remove the '@nuxtjs/eslint-module' in nuxt.config.js

buildModules: [

    // https://go.nuxtjs.dev/eslint
    //'@nuxtjs/eslint-module',
    // https://go.nuxtjs.dev/vuetify
    '@nuxtjs/vuetify',
  ],

yamelsenih added a commit to adempiere/adempiere-vue that referenced this issue Mar 3, 2021
* chore: remove i18n (#1828)

* [release] 4.1.0

* perf[Profile]: adapt the profile page to the mobile (PanJiaChen#2020)

* Revert "perf: optimize page scrolling when setting fixedHeader"

This reverts commit e8e6c7e.

* perf[Style]: refine fixed-header style when open el-dialog

* doc: add new article

* chore: use mockjs in production environment

* fix[sidebar.css]: remove redundant css

* perf[style]: refine dashboard style in mobile (PanJiaChen#2060)

* feat[ErrorLog]: add a clear button in ErrorLog component (PanJiaChen#2065)

* fix[redirect]: fix redirect bug in vue-devtools (PanJiaChen#2066)

* perf[Tinymce]: update tinymce cdn version

* fix[redirect]: fix redirect bug in vue-devtool again

* docs: add support to readme for Spanish (PanJiaChen#2070)

* docs[es]: add some translation(PanJiaChen#2080)

* perf[Exapme]: set page title  according to article id

* perf[RightPanel]: tidy css (PanJiaChen#2101)

* feat[SvgIcon]: support import svg from url (PanJiaChen#2052)

* fix: fixed change roles bug (PanJiaChen#2072)

* perf[Breadcrumb]: do not update breadcrumbs when go to redirect page (PanJiaChen#2086)

* perf[store]: add support to sub-modules (PanJiaChen#2047)

* perf[Login]: support other query (PanJiaChen#2013)

* refactor[chore]: generate postcss.config.js instead of .postcssrc.js

consistent with vue-cli

* perf[Tinymce]: dynamic import tinymce(PanJiaChen#2102)

* [release] 4.2.0

* perf[Style]: refine example css

* fix[Chart]: fixed chart bug in keep-alive (PanJiaChen#2119)

* Create FUNDING.yml

* chore: set localhost => 127.0.0.1 (PanJiaChen#2142)

* update github ISSUE_TEMPLATE

* chore: add autoprefixer to devDependencies

* perf[Tinymce]: add language option (PanJiaChen#2159)

* fix[Tinymce]: fixed bug when init multiple tinymces at the same time (PanJiaChen#2152)

* feat: add tab url demo (PanJiaChen#2114)

* perf[request.js]: refine error reject (PanJiaChen#2160)

* [release] 4.2.1

* perf: default not set withCredentials

* fix[ImageCropper]: removeEventListener when destroyed(PanJiaChen#2169)

* docs: fix typo (PanJiaChen#2170)

* fix: input attribute autocomplete error (PanJiaChen#2191)

* perf[PanThumb]: Replace the image tag with background-image to prevent the stretching (PanJiaChen#2202)

* docs: fix typo README.zh-CN.md (PanJiaChen#2283)

修改错别字

* perf[clipboard.js]: remove redundant code (PanJiaChen#2307)

* bump:  update axios for security vulnerability

* bump: update @vue/cli-plugin-eslint version (PanJiaChen#2327)

FIx  cannot find module '.../node_modules/eslint/lib/api.js/package.json' bug,see vuejs/vue-cli#4231.

* chore: allow dynamic set port

* fix[complex-table]: form header sort icon is out of sync (PanJiaChen#2382)

* fix: fixed missing icons

* fix: typos (PanJiaChen#2532)

Role Nmae => Role Name

* docs: add awesome-project

* fix[Dashboard]: fixed debounce bug (PanJiaChen#2586) (PanJiaChen#2597)

To fixed PanJiaChen#2586

* perf: VS Code support webpack alias file jump (PanJiaChen#2609)

* perf: optimize import file-saver way(PanJiaChen#2347)

* refactor[ImageCropper]: fix lint error (PanJiaChen#2365)

* fix: fixed numberFormatter  bug

PanJiaChen#2568

* fix[example]: fixed create.vue cache error

PanJiaChen#2608

* perf[utils.js]: perf parseTime function (PanJiaChen#2625)

* perf[tagsView]: pref DEL_CACHED_VIEW and DEL_OTHERS_CACHED_VIEWS function (PanJiaChen#2626)

* fix[tagsView]: fixed DEL_OTHERS_CACHED_VIEWS bug

* fix[logout]: empty tagsview when logout (PanJiaChen#2632)

* fix[TagsView]: fixed toLastView bug (PanJiaChen#2634)

* perf[SvgIcon]: change xlink:href to href(PanJiaChen#2645)

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xlink:href

* fix[TagsView]: fixed click.middle can close affixed tag bug (PanJiaChen#2649)

* docs: add job ad

* docs: improved README.md (PanJiaChen#2656)

* style: fix el-date-picker css style

* perf: format dropdown menu code (PanJiaChen#2720)

* perf: format inline edit table (PanJiaChen#2725)

move one format `{row}`

* perf: format drag table (PanJiaChen#2733)

move one format `{row}`

* perf: complex table (PanJiaChen#2732)

Move ont format `{row}`

* perf: text i18n (PanJiaChen#2739)

* update 'MarkdownEditor' components name

* format: space in user card (PanJiaChen#2744)

* perf: format pdf download (PanJiaChen#2791)

* perf[views/icons]: use grid (PanJiaChen#2803)

* feat: plop new generate store (PanJiaChen#2805)

* fix[icons]:fixed eslint 1 error and 2 warnings (PanJiaChen#2835)

* perf[documentation]:  refine css

* fix[Logout]: click blank area of ​​dropDown able to logout (PanJiaChen#2896)

Fixed clicking blank area of ​​drop-down unable to log out

* perf: import mockXHR only in production (PanJiaChen#2910)

* 自动排除mock

生产环境,使用webpack的条件编译自动排除mock数据

* perf: refine

Co-authored-by: 花裤衩 <[email protected]>

* perf[Menu]: remove unused menu-wrapper (PanJiaChen#2903)

* perf[complex-table]:refine code (PanJiaChen#2825)

* 解决无法删除列表的bug;优化代码;

* perf: refine

Co-authored-by: 花裤衩 <[email protected]>

* perf: optimize checkCapslock method (PanJiaChen#2635)

* optimize checkCapslock method

* update

Co-authored-by: 花裤衩 <[email protected]>

* fix[Charts]: fix charts resize in keep-alive bug (PanJiaChen#2922)

* fix[Charts]: fix charts resize in keep-alive bug

* refine

* fix: fixed mock server (PanJiaChen#2929)

* init

* refine

* update

* bump: update element-ui version

* fix: fixed require mock bug in production

* fix: fixed redirect path regex (PanJiaChen#2933)

* perf[Mock]: set responseFake to mock-server.js(PanJiaChen#2966)

* modify 把mock/index.js中与mock-server相关的代码转移到mock-server.js中去,实现两则功能分割

* docs: improve Japanese translation (PanJiaChen#2970)

* perf: change script-loader to dependencies

* fix[profile/UserCard]: fixed wrong key name (PanJiaChen#3056)

roles => role

* fix:fixed parseTime bug in ie and safari(PanJiaChen#3066)

* /src/utils/index.js parseTime 添加IE浏览器(版本10以下,包括版本10)兼容。

* perf: update

Co-authored-by: aisen60 <[email protected]>
Co-authored-by: 花裤衩 <[email protected]>

* perf: format component names as PascalCase (PanJiaChen#3074)

format: component names should be PascalCase

* docs: add smallsticker

* Update README.zh-CN.md

* fix: svg support old broswer (PanJiaChen#3085)

* fixed typo (PanJiaChen#3091)

* fix: use vue-cli default source-map (PanJiaChen#3097)

cheap-module-eval-source-map

* perf[Tinymce]: editor try to keep these URLs intact (PanJiaChen#3141)

* fix[element-variables]: missing space in element-variables (PanJiaChen#3144)

* fix: compatibility with vetur (#1700)

* perf: change default element-ui language to english (PanJiaChen#2741)

* feat: add option to try project on CodeSandbox (PanJiaChen#2976)

* docs: add tips

* perf: when tags-view scroll close the right-menu

* fix[parseTime]: fixed when pass null (PanJiaChen#3038)

* fix[css]: min btn width (PanJiaChen#3164)

* docs: Improve read me files and changes in Spanish. (PanJiaChen#3234)

* [release] 4.2.2

* chore: change node-sass to dart-sass (PanJiaChen#3040)

* perf: change >>> ::v-deep

* [release] 4.3.0

* docs: fix wrong link

* chore: turn on the preload

* refactor: change mock files to commonjs (PanJiaChen#3246)

* feat[Menu]: menu icon support el-icon(PanJiaChen#3048)

* fix[utils]: param2Obj bug when url params includes ==(PanJiaChen#3100)

* perf: remove unused showdown

Co-authored-by: 花裤衩 <[email protected]>

* perf: lint code

* fix[v-permission]: support dynamic set roles (PanJiaChen#3251)

* chore: update element-ui to 2.13.2

* fix[plop]: set trim => trim() (PanJiaChen#3254)

notEmpty

* fix some typos

* [release] 4.3.1

* bump: update to vue-cli@4 (PanJiaChen#3028)

* [release] 4.4.0

* fix[chore]: do not preload runtime.js (PanJiaChen#3279)

* perf[chore]: remove preserveWhitespace config (PanJiaChen#3280)

* perf[Tinymce]: remove useless code (PanJiaChen#3295)

* perf[permission.js]: remove useless code (PanJiaChen#3301)

* typo: replace Css with CSS (PanJiaChen#3323)

* docs: add GitAds

* docs: remove gitads

* docs: add vue-java-admin-dashboard-spring

* perf: refine documentation button css

* docs: add coupon

* feat: add new sponsored

* update dependencies.

* fix: chart components, TODO: eslint-plugin-vue.

* Update FUNDING.yml

Co-authored-by: 花裤衩 <[email protected]>
Co-authored-by: toruksmakto <[email protected]>
Co-authored-by: Yamel Senih <[email protected]>
Co-authored-by: Yamel Senih <[email protected]>
Co-authored-by: liugq <[email protected]>
Co-authored-by: bpzhang <[email protected]>
Co-authored-by: Serge <[email protected]>
Co-authored-by: MaYuanhai <[email protected]>
Co-authored-by: Jessynt <[email protected]>
Co-authored-by: 肖敏 <[email protected]>
Co-authored-by: TinaryTree <[email protected]>
Co-authored-by: itsccn <[email protected]>
Co-authored-by: why <[email protected]>
Co-authored-by: Baskerville* <[email protected]>
Co-authored-by: Francis <[email protected]>
Co-authored-by: monkeycf <[email protected]>
Co-authored-by: BradyBromley <[email protected]>
Co-authored-by: Phạm Ngọc Hòa <[email protected]>
Co-authored-by: bbigcd <[email protected]>
Co-authored-by: xuanzai <[email protected]>
Co-authored-by: flitrue <[email protected]>
Co-authored-by: 韬 <[email protected]>
Co-authored-by: 任羽飞 <[email protected]>
Co-authored-by: Kaitian Xie <[email protected]>
Co-authored-by: AndyLZC/AndyLZC.github.io <[email protected]>
Co-authored-by: RussXD <[email protected]>
Co-authored-by: 李小斐 <[email protected]>
Co-authored-by: RoBlues <[email protected]>
Co-authored-by: Shota Aratono <[email protected]>
Co-authored-by: echofly <[email protected]>
Co-authored-by: Aisen60 <[email protected]>
Co-authored-by: aisen60 <[email protected]>
Co-authored-by: Alex S <[email protected]>
Co-authored-by: Aisen <[email protected]>
Co-authored-by: ntnyq <[email protected]>
Co-authored-by: garethx <[email protected]>
Co-authored-by: AiMe1991 <[email protected]>
Co-authored-by: cooper <[email protected]>
Co-authored-by: Nickbing Lao <[email protected]>
Co-authored-by: Edwin Betancourt <[email protected]>
Co-authored-by: Cat73 <[email protected]>
Co-authored-by: Silentdoer <[email protected]>
Co-authored-by: qige2016 <[email protected]>
Co-authored-by: Dihak <[email protected]>
Co-authored-by: crayymumu <[email protected]>
Co-authored-by: dyz <[email protected]>
Co-authored-by: Kerollos Magdy <[email protected]>
Co-authored-by: EdwinBetanc0urt <[email protected]>
@aManNamedJed
Copy link

This was the only thing that worked for me:

//vue.config.js
module.exports = {
  lintOnSave: false,
}

@soobing
Copy link

soobing commented Aug 24, 2021

After upgrade node version to v14.17.5(current LTS), problem solved 😱 ...
My last node version was v12.

iGuru-T added a commit to iGuru-T/vue-element-admin that referenced this issue Mar 22, 2022
FIx  cannot find module '.../node_modules/eslint/lib/api.js/package.json' bug,see vuejs/vue-cli#4231.
B-Guru added a commit to B-Guru/vue-element-admin that referenced this issue Mar 24, 2022
FIx  cannot find module '.../node_modules/eslint/lib/api.js/package.json' bug,see vuejs/vue-cli#4231.
CoinDev1121 added a commit to CoinDev1121/vue-element-admin that referenced this issue Apr 4, 2022
FIx  cannot find module '.../node_modules/eslint/lib/api.js/package.json' bug,see vuejs/vue-cli#4231.
coin-monster added a commit to coin-monster/vue-element-admin that referenced this issue May 24, 2022
FIx  cannot find module '.../node_modules/eslint/lib/api.js/package.json' bug,see vuejs/vue-cli#4231.
pvtrong pushed a commit to pvtrong/vue-element-admin that referenced this issue Jul 22, 2022
FIx  cannot find module '.../node_modules/eslint/lib/api.js/package.json' bug,see vuejs/vue-cli#4231.
anteroselin pushed a commit to anteroselin/vue-element-admin that referenced this issue Mar 6, 2023
FIx  cannot find module '.../node_modules/eslint/lib/api.js/package.json' bug,see vuejs/vue-cli#4231.
phantomeco pushed a commit to phantomeco/vue-element-admin that referenced this issue Jun 25, 2023
FIx  cannot find module '.../node_modules/eslint/lib/api.js/package.json' bug,see vuejs/vue-cli#4231.
@KennethicEnergy
Copy link

Run this command to fix the issue:
export NODE_OPTIONS=--openssl-legacy-provider

trent081 pushed a commit to trent081/admin-dashboard-vue that referenced this issue Sep 1, 2023
FIx  cannot find module '.../node_modules/eslint/lib/api.js/package.json' bug,see vuejs/vue-cli#4231.
FPLeader added a commit to FPLeader/vue-element-admin that referenced this issue Sep 12, 2023
FIx  cannot find module '.../node_modules/eslint/lib/api.js/package.json' bug,see vuejs/vue-cli#4231.
harrialeksi pushed a commit to harrialeksi/Vue-admin that referenced this issue Sep 13, 2023
FIx  cannot find module '.../node_modules/eslint/lib/api.js/package.json' bug,see vuejs/vue-cli#4231.
fuyuooumi1027 added a commit to fuyuooumi1027/vue-element-admin that referenced this issue Nov 25, 2023
FIx  cannot find module '.../node_modules/eslint/lib/api.js/package.json' bug,see vuejs/vue-cli#4231.
kenssa4eedfd pushed a commit to DragonKingpin/sparta-uofs-console-cf that referenced this issue Jan 31, 2025
FIx  cannot find module '.../node_modules/eslint/lib/api.js/package.json' bug,see vuejs/vue-cli#4231.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.