Skip to content

[BUG] Cannot publish over previously published version '1.0.0' of a package that doesn't exist. #8194

@Torathion

Description

@Torathion

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

I wanted to release a new package on npm. I've checked that it doesn't exist and still, the registry gives me metadata of it that doesn't make sense. It shows publish times from 2018, but I couldn't find any package of that name. My package was supposed to be called micro-tree.

Output of npm publish:

npm notice
npm notice 📦  micro-tree@1.0.0
npm notice Tarball Contents
npm notice 1.1kB LICENSE
npm notice 4.9kB README.md
npm notice 2.4kB dist/index.js
npm notice 1.9kB dist/index.mjs
npm notice 6.1kB index.d.ts
npm notice 1.2kB package.json
npm notice Tarball Details
npm notice name: micro-tree
npm notice version: 1.0.0
npm notice filename: micro-tree-1.0.0.tgz
npm notice package size: 5.8 kB
npm notice unpacked size: 17.7 kB
npm notice shasum: cdf9469c1817483afcc752179d20aef280c2edf8
npm notice integrity: sha512-tkjbiaIKXXBaJ[...]uHQGmmsL48ugQ==
npm notice total files: 6
npm notice
npm notice Publishing to https://registry.npmjs.org/ with tag latest and default access
npm error code E400
npm error 400 Bad Request - PUT https://registry.npmjs.org/micro-tree - Cannot publish over previously published version "1.0.0".

Output of npm view micro-tree version

npm error code E404
npm error 404 Unpublished on 2019-04-30T18:27:56.765Z
npm error 404
npm error 404  'micro-tree' is not in this registry.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.

When I put https://registry.npmjs.org/micro-tree into the url of my browser it downloads a small file with these metadata:

{
    "_id": "micro-tree",
    "name": "micro-tree",
    "time": {
        "created": "2018-09-19T08:09:01.031Z",
        "1.0.0": "2018-09-19T08:09:01.167Z",
        "modified": "2019-04-30T18:27:56.765Z",
        "1.0.1": "2018-09-24T10:59:54.850Z",
        "1.0.2": "2018-09-24T11:08:01.430Z",
        "1.0.3": "2018-09-27T09:57:38.081Z",
        "1.0.4": "2018-09-27T14:39:43.326Z",
        "1.0.5": "2018-10-01T10:10:20.141Z",
        "1.0.6": "2018-10-02T09:08:04.991Z",
        "1.1.0": "2018-10-09T10:33:26.354Z",
        "1.2.0": "2019-03-01T09:26:32.894Z",
        "unpublished": {
            "time": "2019-04-30T18:27:56.765Z",
            "versions": [
                "1.0.0",
                "1.0.1",
                "1.0.2",
                "1.0.3",
                "1.0.4",
                "1.0.5",
                "1.0.6",
                "1.1.0",
                "1.2.0"
            ]
        }
    }
}

But the actual page doesn't exist. Was I just unlucky and named a package after a private one?

Expected Behavior

Shouldn't output an error, if the package doesn't exist.

Steps To Reproduce

My package is a public: micro-tree

Clone it, build it, try to publish it. It seems the registry either has some dirty entries or the actual package is private and I was just unlucky.

Environment

  • npm: 11.1.0
  • Node.js: 22.13.0
  • OS Name: Windows 10
  • System Model Name:
  • npm config:
; copy and paste output from `npm config ls` here

Metadata

Metadata

Assignees

No one assigned

    Labels

    Registryspecific to registry implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions