How to fix npm ERR! 409 Conflict in npm

npmBEGINNERMEDIUMUpdated Dec 6, 2025· 145 views

The HTTP 409 Conflict error in npm occurs during publish operations when there's a version conflict. This usually means you're trying to publish a version that already exists or there's a concurrent modification.

Quick fix

Fixes npm ERR! 409 Conflict

npm view your-package versions

# Or check specific version
npm view your-package@1.0.0
  1. Check if version exists
  2. Bump the version
  3. Check package.json version
  4. Handle partial publish failures
npm — error
npm view your-package versions
# Or check specific version
npm view your-package@1.0.0
npm ERR! 409 Conflict

What this error means

HTTP 409 Conflict indicates that the request conflicts with the current state of the resource on the server. In npm's context, this most commonly happens when trying to publish a package version that already exists in the registry. The registry maintains strict versioning - once a version is published, it cannot be republished with different content. This ensures reproducible builds across the ecosystem.

Typical symptoms

  • npm publish fails with 409 Conflict
  • Error mentions "cannot publish over existing version"
  • Package shows as published but publish still fails
  • CI/CD pipeline fails on release
  • Manual publish after automated one fails
  • Error occurs after failed partial publish

Common causes

  1. Version already exists in registry
  2. Failed to bump version before publish
  3. Concurrent publish attempts
  4. Previously failed publish left partial state
  5. Package was published and unpublished
  6. Version number in package.json not updated
  7. Merge conflict in package.json version

How to fix "npm ERR! 409 Conflict"

1Check if version exists

Verify what versions are published:

bash
npm view your-package versions

# Or check specific version
npm view your-package@1.0.0

If version exists, you need a new version number.

2Bump the version

Increment the version properly:

bash
# Patch version (1.0.0 -> 1.0.1)
npm version patch

# Minor version (1.0.0 -> 1.1.0)
npm version minor

# Major version (1.0.0 -> 2.0.0)
npm version major

This updates package.json and creates a git tag.

3Check package.json version

Ensure version is correct:

bash
cat package.json | grep version

Manually edit if needed, but prefer npm version for automation.

4Handle partial publish failures

If a previous publish partially succeeded:

bash
# Wait a few minutes for registry to sync
# Then check if it's actually published
npm view your-package@version

# If not published, try again
npm publish

# If partially published, bump version and republish
5Use --force cautiously

In rare cases where version doesn't truly exist:

bash
npm publish --force

⚠️ This won't override existing versions, but may help with stale registry state.

6Set up automated versioning

Prevent future conflicts:

json
// package.json - use semantic-release or similar
{
  "scripts": {
    "release": "semantic-release"
  }
}

Or use npm version in CI before publish.

Advanced notes

npm's immutability policy means published versions cannot be changed. Use semantic versioning (semver) to manage versions properly. For monorepos, tools like Lerna or Changesets help coordinate multi-package version bumps. In CI/CD, use npm version --no-git-tag-version if git tags are managed separately. Consider using alpha/beta/rc versions for pre-releases.

Frequently asked questions

What does "npm ERR! 409 Conflict" mean?
HTTP 409 Conflict indicates that the request conflicts with the current state of the resource on the server. In npm's context, this most commonly happens when trying to publish a package version that already exists in the registry. The registry maintains strict versioning - once a version is published, it cannot be republished with different content.
How do I fix "npm ERR! 409 Conflict"?
The HTTP 409 Conflict error in npm occurs during publish operations when there's a version conflict. This usually means you're trying to publish a version that already exists or there's a concurrent modification.
What causes "npm ERR! 409 Conflict"?
Version already exists in registry Failed to bump version before publish Concurrent publish attempts
Is the "npm ERR! 409 Conflict" error serious?
It is a medium-severity error — more of a blocker than a risk. The steps above resolve it.

Official resources & further reading