Skip to content

Fix: Changesets Not Working — Version Not Bumping, Changelog Empty, or GitHub Action Failing

FixDevs ·

Quick Answer

How to fix @changesets/cli issues — changeset creation, version bumping, changelog generation, monorepo support, npm publishing, and GitHub Actions automation.

The Problem

changeset version doesn’t bump the version:

npx changeset version
# No changes were detected — nothing to version

Or the changelog is empty after versioning:

CHANGELOG.md exists but has no entries

Or the GitHub Action fails to create a PR:

Error: No changesets found — or —
Error: GITHUB_TOKEN does not have permission

Why This Happens

Changesets is a versioning and changelog management tool for JavaScript packages. It tracks intentional changes through changeset files:

  • Changesets must be created before versioningchangeset version reads .changeset/*.md files to determine what to bump. Without changeset files, there’s nothing to version.
  • Each changeset file describes one logical change — running npx changeset creates a markdown file in .changeset/ that specifies which packages changed and the bump type (major/minor/patch). Forgetting to create changesets means version has nothing to do.
  • Monorepo dependencies are tracked — in a monorepo, bumping package A may require bumping package B if B depends on A. Changesets handles this automatically but needs correct workspace configuration.
  • GitHub Actions need specific permissions — the Changesets GitHub Action creates PRs and pushes tags. It needs contents: write and pull-requests: write permissions.

Fix 1: Setup

npm install -D @changesets/cli
npx changeset init
# Creates .changeset/ directory with config.json
// .changeset/config.json
{
  "$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
  "changelog": "@changesets/cli/changelog",
  "commit": false,
  "fixed": [],
  "linked": [],
  "access": "public",
  "baseBranch": "main",
  "updateInternalDependencies": "patch",
  "ignore": []
}

Fix 2: Create and Apply Changesets

# Step 1: Create a changeset (interactive)
npx changeset

# Prompts:
# Which packages? → Select packages that changed
# Bump type? → major / minor / patch
# Summary? → "Add user authentication with OAuth support"

# This creates a file like .changeset/happy-dogs-run.md:
---
"my-package": minor
---

Add user authentication with OAuth support
# Step 2: Version — reads changesets and bumps versions
npx changeset version

# This:
# 1. Reads all .changeset/*.md files
# 2. Bumps package.json versions accordingly
# 3. Updates CHANGELOG.md
# 4. Deletes consumed changeset files

# Step 3: Publish to npm
npx changeset publish

# Or manually:
npm publish
// package.json — scripts
{
  "scripts": {
    "changeset": "changeset",
    "version": "changeset version",
    "publish": "changeset publish",
    "release": "npm run build && changeset publish"
  }
}

Fix 3: Monorepo Configuration

// .changeset/config.json — monorepo settings
{
  "changelog": ["@changesets/changelog-github", { "repo": "user/repo" }],
  "commit": false,
  "access": "public",
  "baseBranch": "main",

  // Fixed versioning — all packages bump together
  "fixed": [["@myorg/core", "@myorg/react", "@myorg/vue"]],

  // Linked versioning — bump together but can have different versions
  "linked": [["@myorg/utils", "@myorg/shared"]],

  // Ignore packages (don't version/publish)
  "ignore": ["docs", "examples", "@myorg/internal-tools"],

  // When a dependency bumps, bump dependents
  "updateInternalDependencies": "patch"
}
# Install GitHub changelog for rich changelogs with PR links
npm install -D @changesets/changelog-github
<!-- Example generated CHANGELOG.md with GitHub changelog -->
# @myorg/core

## 2.1.0

### Minor Changes

- Add OAuth authentication support ([#123](https://github.com/user/repo/pull/123)) by @developer

### Patch Changes

- Updated dependencies
  - @myorg/[email protected]
# Monorepo changeset — select multiple packages
npx changeset
# Which packages? → @myorg/core, @myorg/react
# What type for @myorg/core? → minor
# What type for @myorg/react? → patch
# Summary → "Add OAuth support"

Fix 4: GitHub Actions Automation

# .github/workflows/release.yml
name: Release

on:
  push:
    branches: [main]

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
  contents: write
  pull-requests: write

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          registry-url: 'https://registry.npmjs.org'

      - run: npm ci
      - run: npm run build

      - name: Create Release PR or Publish
        id: changesets
        uses: changesets/action@v1
        with:
          # Commands to run
          version: npx changeset version
          publish: npx changeset publish
          # PR title and body
          title: 'chore: version packages'
          commit: 'chore: version packages'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

How it works:

  1. Developer creates a PR with a changeset file
  2. PR is merged to main
  3. GitHub Action detects changesets → creates a “Version Packages” PR
  4. Merging the Version PR triggers the publish step
  5. Packages are published to npm with proper versions and changelogs

Fix 5: Pre-Release Versions

# Enter pre-release mode
npx changeset pre enter beta
# Now all versions are suffixed: 1.2.0-beta.0, 1.2.0-beta.1, etc.

# Create changesets as normal
npx changeset
# Version with pre-release suffix
npx changeset version
# Publish as beta
npx changeset publish --tag beta

# Exit pre-release mode when ready for stable
npx changeset pre exit
npx changeset version  # Now bumps to stable: 1.2.0
npx changeset publish
// package.json — tag pre-releases on npm
{
  "scripts": {
    "publish:beta": "changeset publish --tag beta",
    "publish:rc": "changeset publish --tag rc",
    "publish:stable": "changeset publish"
  }
}

Fix 6: Snapshot Releases (For Testing)

# Snapshot — publish a unique version for testing (doesn't consume changesets)
npx changeset version --snapshot canary

# Publishes as: 0.0.0-canary-20260329T120000
npx changeset publish --tag canary --no-git-tag

# Install snapshot version for testing
npm install my-package@canary
# GitHub Action — publish snapshot on every PR
name: Snapshot
on: pull_request
jobs:
  snapshot:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          registry-url: 'https://registry.npmjs.org'
      - run: npm ci && npm run build
      - run: npx changeset version --snapshot pr-${{ github.event.number }}
      - run: npx changeset publish --tag pr-${{ github.event.number }} --no-git-tag
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Still Not Working?

“No changesets found” — no .changeset/*.md files exist (other than README.md). Run npx changeset to create one before running npx changeset version. Each changeset file must have YAML frontmatter specifying packages and bump types.

Version bumps but changelog is empty — the changeset file has no description text after the YAML frontmatter. The text below --- becomes the changelog entry. An empty body produces an empty changelog.

GitHub Action can’t create PR — the workflow needs permissions: { contents: write, pull-requests: write }. Also ensure GITHUB_TOKEN has the right scopes. For organization repos, check branch protection rules allow the GitHub Actions bot to push.

Monorepo packages not detected — Changesets reads workspaces from package.json or pnpm-workspace.yaml. Verify your workspace configuration includes all packages. Run npx changeset status to see which packages Changesets knows about.

For related publishing issues, see Fix: tsup Not Working and Fix: pnpm Peer Dependency Error.

F

FixDevs

Solo developer based in Japan. Every solution is cross-referenced with official documentation and tested before publishing.

Was this article helpful?

Related Articles