You cannot publish over the previously published versions

user1795832 picture user1795832 · Dec 11, 2018 · Viewed 12.1k times · Source

I've updated my package using npm version minor to go from 0.4.0 to 0.5.0, and both package.json and package-lock.json reflect this. However when I run the npm publish command it says:

You cannot publish over the previously published versions: 0.4.0

Is there another place I need to update the semver in order to publish?

Answer

Adrita Sharma picture Adrita Sharma · Oct 31, 2019

This helped me:

Open Command Prompt and do the following steps.

  1. npm version <new_Version_No>
  2. npm publish