When using the legacy ESLint config system, you may see this error running ESLint after installing dependencies:
ESLint couldn't find the config "${configName}" to extend from. Please check that the name of the config is correct.
The config "${configName}" was referenced from the config file in "${importerName}".
ESLint configuration files specify shareable configs by their package name in the extends array. That package name is passed to the Node.js require(), which looks up the package under local node_modules/ directories. For example, the following ESLint config will first try to load a module located at node_modules/eslint-config-yours:
module.exports = {
extends: ["eslint-config-yours"],
};
The error is output when you attempt to extend from a configuration and the package for that configuration is not found in any searched node_modules/.
Common reasons for this occurring include:
npm install or the equivalent package manager commandNote that ESLint supports several config name formats:
eslint-config- config name prefix may be omitted for brevity, e.g. extends: ["yours"] @ npm scoped packages put the eslint-config- prefix after the org scope, e.g. extends: ["@org/yours"] to load from @org/eslint-config-yours
plugin: prefix indicates a config is loaded from a shared plugin, e.g. extends: [plugin:yours/recommended] to load from eslint-plugin-yours
Common resolutions for this issue include:
devDependency in your package.json.npm install or the equivalent package manager command.For more information, see:
© OpenJS Foundation and other contributors
Licensed under the MIT License.
https://eslint.org/docs/latest/use/troubleshooting/couldnt-find-the-config