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 .releasercCommon 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
- Create a .releaserc with your branches and plugins.
- Validate the JSON so it parses cleanly.
- 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.
Related guides
semantic-release "Cannot find module '@semantic-release/...'" plugin in CIFix semantic-release "Cannot find module '@semantic-release/git'" (or similar) in CI - a plugin listed in con…
semantic-release "EINVALIDBRANCH" branch not configured in CIFix semantic-release running on a branch that is not in the branches config in CI - it skips the release beca…
semantic-release "not triggered in a known CI environment" in CIFix semantic-release "This run was not triggered in a known CI environment" - it did not detect CI, so it ran…