Skip to content
Latchkey

Stylelint "Could not find a config" - Fix Missing Config in CI

Stylelint could not find a configuration to run, or could not load a config named in extends. There is no .stylelintrc, or a shareable config like stylelint-config-standard is referenced but not installed.

What this error means

Stylelint fails with No configuration provided or Could not find "stylelint-config-standard". Do you need to install it?. Nothing lints because the config cannot be assembled.

stylelint
Error: Could not find "stylelint-config-standard". Do you need a `configBasedir`?
# or:
No configuration provided for /app/src/styles.css

Common causes

No config file present

There is no .stylelintrc.*/stylelint.config.js (or stylelint key in package.json) where Stylelint runs, so it has no configuration.

Shareable config not installed

A config named in extends (e.g. stylelint-config-standard) is missing from node_modules - not declared, or dropped by a clean install.

How to fix it

Add a config and install the shareable config

Create a config that extends an installed shareable config.

Terminal
npm install -D stylelint stylelint-config-standard
# .stylelintrc.json
# { "extends": "stylelint-config-standard" }

Point Stylelint at the right config

  1. Ensure a .stylelintrc.* exists at the project root (or pass --config).
  2. Declare every extends config in devDependencies.
  3. Run Stylelint from a directory where it can discover the config.

How to prevent it

  • Commit a .stylelintrc and declare shareable configs in devDependencies.
  • Install with npm ci so the Stylelint toolchain is reproducible.
  • Run Stylelint from a consistent directory in CI.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →