question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to load config "xo/esnext" to extend from

See original GitHub issue

I always keep xo installed globally so I can usually run lint without running npm install on the local repo. This does not work for me after updating my global install to 0.25.3:

$ npm i -g xo
$ rm -fr node_modules
$ xo
Error: Failed to load config "xo/esnext" to extend from.
Referenced from: BaseConfig
    at configMissingError (/home/cfarrell/.nvm/versions/node/v12.10.0/lib/node_modules/xo/node_modules/eslint/lib/cli-engine/config-array-factory.js:233:9)
    at ConfigArrayFactory._loadExtendedShareableConfig (/home/cfarrell/.nvm/versions/node/v12.10.0/lib/node_modules/xo/node_modules/eslint/lib/cli-engine/config-array-factory.js:712:23)
    at ConfigArrayFactory._loadExtends (/home/cfarrell/.nvm/versions/node/v12.10.0/lib/node_modules/xo/node_modules/eslint/lib/cli-engine/config-array-factory.js:617:25)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/home/cfarrell/.nvm/versions/node/v12.10.0/lib/node_modules/xo/node_modules/eslint/lib/cli-engine/config-array-factory.js:547:25)
    at _normalizeObjectConfigDataBody.next (<anonymous>)
    at ConfigArrayFactory._normalizeObjectConfigData (/home/cfarrell/.nvm/versions/node/v12.10.0/lib/node_modules/xo/node_modules/eslint/lib/cli-engine/config-array-factory.js:491:20)
    at _normalizeObjectConfigData.next (<anonymous>)
    at createConfigArray (/home/cfarrell/.nvm/versions/node/v12.10.0/lib/node_modules/xo/node_modules/eslint/lib/cli-engine/config-array-factory.js:307:25)
    at ConfigArrayFactory.create (/home/cfarrell/.nvm/versions/node/v12.10.0/lib/node_modules/xo/node_modules/eslint/lib/cli-engine/config-array-factory.js:362:16)
    at createBaseConfigArray (/home/cfarrell/.nvm/versions/node/v12.10.0/lib/node_modules/xo/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:84:48)

This seems to be caused by eslint@6, see https://eslint.org/docs/user-guide/migrating-to-6.0.0#-plugins-and-shareable-configs-are-no-longer-affected-by-eslints-location

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:9
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
friederbluemlecommented, Apr 19, 2020

I ran into the same issue with a global xo installation.

@coreyfarrell was right on point with his initial assessment:

This seems to be caused by eslint@6

To add another quote from ESLint’s migration guide:

If you use a global installation of ESLint (e.g. installed with npm install eslint --global) along with plugins, you should install those plugins locally in the projects where you run ESLint. […]

I got it to work after locally installing the required configs/plugins:

npm i -D eslint-config-xo

There are likely other missing packages, e.g. eslint-plugin-import etc. - They all need to be available locally.

The reason why xo@0.24.0 still works is because it uses ESLint 5. xo@0.25.0 and later uses ESLint 6.

4reactions
isghecommented, Aug 6, 2022
$ xo --version
0.36.1

$ xo
Error: Failed to load config "xo/esnext" to extend from.
Referenced from: BaseConfig
    at configMissingError (/usr/local/lib/node_modules/xo/node_modules/@eslint/eslintrc/lib/config-array-factory.js:289:9)
    at ConfigArrayFactory._loadExtendedShareableConfig (/usr/local/lib/node_modules/xo/node_modules/@eslint/eslintrc/lib/config-array-factory.js:877:23)
    at ConfigArrayFactory._loadExtends (/usr/local/lib/node_modules/xo/node_modules/@eslint/eslintrc/lib/config-array-factory.js:780:25)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/usr/local/lib/node_modules/xo/node_modules/@eslint/eslintrc/lib/config-array-factory.js:719:25)
    at _normalizeObjectConfigDataBody.next (<anonymous>)
    at ConfigArrayFactory._normalizeObjectConfigData (/usr/local/lib/node_modules/xo/node_modules/@eslint/eslintrc/lib/config-array-factory.js:664:20)
    at _normalizeObjectConfigData.next (<anonymous>)
    at ConfigArrayFactory.create (/usr/local/lib/node_modules/xo/node_modules/@eslint/eslintrc/lib/config-array-factory.js:459:16)
    at createBaseConfigArray (/usr/local/lib/node_modules/xo/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js:98:48)
    at new CascadingConfigArrayFactory (/usr/local/lib/node_modules/xo/node_modules/@eslint/eslintrc/lib/cascading-config-array-factory.js:234:30)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Failed to load config "next" to extend from - Stack Overflow
Resolved, after installing this package, the code will run without error: npm i --save-dev eslint-config-next.
Read more >
Failed to load config "xo/esnext" to extend from. #22 - GitHub
where > npx xo works just perfectly fine. ... NOTE: I also tried providing a configuration to xo in the task, which did...
Read more >
eslint: failed to load config "next/babel" to extend from. - You.com
Run pnpx create-turbo or npx create-turbo · Setup using CLI as normal, and select pnpm as the package manager. · Open Visual Studio...
Read more >
How to fix eslint error [eslint] Failed to load config "google" to ...
Building my project I get the following error: [eslint] Failed to load config "google" to extend from. Does anyone know how to fixed...
Read more >
eslint/eslint - Gitter
[Error - 10:09:11 AM] Error: Failed to load config "airbnb" to extend from. Referenced from: /Users/nachoaj/Projects/nowo/paymentMicroservice/.eslintrc at ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found