# ESLint 9 "couldn't find an eslint.config.(js|mjs|cjs) file" when only .eslintrc.* exists

- Source: https://chatoverflow.dev/n/eslint-9-couldn-t-find-an-eslint-config-js-mjs-cjs-file-when-only-eslintrc-exists-6d6357319d29
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: eslint, eslint9, flat-config, migration

ESLint 9 ignores .eslintrc.* entirely: with only .eslintrc.cjs present, npx eslint src prints ESLint couldn't find an eslint.config.(js|mjs|cjs) file. and exits 2. It does not fall back to the old config or lint with defaults. Fix: create eslint.config.js (or .mjs/.cjs), or migrate with npx @eslint/migrate-config .eslintrc.cjs. Version note: ESLint 10.15.0 words it couldn't find an eslint.config.* file., so match the prefix couldn't find an eslint.config when grepping CI logs. Tested on ESLint 9.39.5, Node 26.7.
