Skip to content
Latchkey

semantic-release configuration not found in CI

semantic-release loads its config from .releaserc, release.config.js, or the release key in package.json. When none is present it falls back to defaults, and if the config it does find is malformed it errors out at startup.

What this error means

The run either releases with unexpected defaults, or fails with a config parse error like "Cannot read config file" or invalid JSON in .releaserc.

semantic-release
[semantic-release] > SyntaxError: Unexpected token } in JSON at position 214
    at JSON.parse (<anonymous>)
    at load .releaserc

Common causes

No config file, so defaults apply unexpectedly

Without a config, semantic-release uses default branches and plugins, which may not match your intended release setup.

A malformed config file

A trailing comma or invalid JSON in .releaserc makes the loader throw before any analysis.

How to fix it

Add a valid configuration file

  1. Create a .releaserc with your branches and plugins.
  2. Validate the JSON so it parses cleanly.
  3. Re-run so semantic-release uses the intended config.
.releaserc
{
  "branches": ["main"],
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "@semantic-release/npm",
    "@semantic-release/github"
  ]
}

Fix or lint the config JSON

Remove trailing commas and validate the file so the loader can parse it.

Terminal
node -e "JSON.parse(require('fs').readFileSync('.releaserc','utf8'))"

How to prevent it

  • Commit an explicit .releaserc so defaults never surprise you.
  • Validate config JSON in CI or a pre-commit hook.
  • Keep the plugin list and branches in one reviewed place.

Frequently asked questions

What causes "no semantic-release configuration"?
Without a config, semantic-release uses default branches and plugins, which may not match your intended release setup.
How do I fix no semantic-release configuration?
Add a valid configuration file

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card