Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to republish an unpublished npm package?

Tags:

npm

Summary

I published a package (license-plate-serial-generator) to the npm repository a few years ago (roughly), then unpublished it a few months ago. I now want to republish it.

It's not clear to me if republishing an unpublished package is possible because I've experienced mixed results trying to do so

What I've tried

I bumped the package version and published that new version yesterday. npm publish was successful and I received an email with the following content:

Hi ptrkcsk!

A new version of the package license-plate-serial-generator (0.2.3) was published at 2021-12-23T00:02:52.024Z…

However, the package is still mostly unavailable on npm:

  • npm install fails with a relatively vague error message:
    $ npm install license-plate-serial-generator
    
    npm ERR! code ENOVERSIONS
    npm ERR! No versions available for license-plate-serial-generator
    ...
    
  • npm info fails with a clear error message:
    $ npm info license-plate-serial-generator   
    
    npm ERR! code E404
    npm ERR! 404 Unpublished by ptrkcsk on 2021-07-29T21:32:41.957Z
    npm ERR! 404 
    npm ERR! 404  'license-plate-serial-generator' is not in this registry.
    npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
    ...
    
  • The package page returns a 404: license-plate-serial-generator 404
  • The package shows up in search: npm search results page for 'license plate'
  • In my npm account packages page, the package count includes license-plate-serial-generator, but it's not shown in the list of packages npm account packages page

The npm docs page for 'Unpublishing packages from the registry' says:

Unpublishing a package permanently removes the package from the registry so it is no longer available for other users to install. Once a package is unpublished, republishing under the same name is blocked for 24 hours.

It's confusing to me that unpublishing is 'permanent', but it's possible to republish 24 hours after unpublishing

like image 449
ptrkcsk Avatar asked Sep 12 '26 17:09

ptrkcsk


1 Answers

This issue was resolved. I contacted npm. They asked me to publish a new version after clearing the cache on their end, and now the package has been fully republished.

like image 79
ptrkcsk Avatar answered Sep 15 '26 07:09

ptrkcsk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!