np tries to publish to npm twice, then fails and rollback

Created on 14 Mar 2020  Β·  1Comment  Β·  Source: sindresorhus/np

Description

When I run np minor, I get this:

np minor

Publish a new version of images-responsiver (current: 0.2.0)

Commits:
- Add np module for releases  431207d
- Version mismatch  2c0952a
- Get the resized image URL with a function from the options  317a1bf
- Add Travis badge  2bb5c2f
- Add Travis CI  f2002d8
- Tests are passing! πŸ’ͺ  b7f11e8
- Add html-minifier module to make sure tests strings are similar  ab1b82a
- Carriage return… πŸ€·β€β™‚οΈ  2b01e16
- Don't use width larger than the image's one  2be463f
- don't use attributes with null value  afe2cf3
- Test HTML string transformation is not easy  ddf1ad3
- JSDOM's getAttribute() return "null" if the attribute is not there  4e860c9
- Make tests  bd07e31
- Transform images  6fc9317
- Initialize the lib  e24ffd4

Commit Range:
b8269781156f043a1af684ebf81eb06962756641...master

Registry:
https://registry.npmjs.org/


  βœ” Prerequisite check
  βœ” Git
  ↓ Cleanup [skipped]
  βœ” Prerequisite check
  βœ” Git
  ↓ Cleanup [skipped]
  βœ” Installing dependencies using npm
  βœ” Running tests using npm
  βœ” Bumping version using npm
  βœ– Publishing package using npm
    β†’ The project was rolled back to its previous state.
    Enabling two-factor authentication
    Pushing tags
    Creating release draft on GitHub

βœ– Error publishing package:
Command failed with exit code 1: npm publish
npm notice
npm notice πŸ“¦  [email protected]
npm notice === Tarball Contents ===
npm notice 1.1kB LICENSE
npm notice 1.2kB package.json
npm notice 431B  README.md
npm notice === Tarball Details ===
npm notice name:          images-responsiver
npm notice version:       0.3.0
npm notice package size:  1.4 kB
npm notice unpacked size: 2.7 kB
npm notice shasum:        eb47557cc6a0088e098a25b032cc010743e68838
npm notice integrity:     sha512-hHtxCwFgPb7kz[...]gOv0JthDfuvFA==
npm notice total files:   3
npm notice
npm notice
npm notice πŸ“¦  [email protected]
npm notice === Tarball Contents ===
npm notice 1.1kB LICENSE
npm notice 1.2kB package.json
npm notice 431B  README.md
npm notice === Tarball Details ===
npm notice name:          images-responsiver
npm notice version:       0.3.0
npm notice package size:  1.4 kB
npm notice unpacked size: 2.7 kB
npm notice shasum:        eb47557cc6a0088e098a25b032cc010743e68838
npm notice integrity:     sha512-hHtxCwFgPb7kz[...]gOv0JthDfuvFA==
npm notice total files:   3
npm notice
npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmjs.org/images-responsiver - You cannot publish over the previously published versions: 0.3.0.
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/nhoizey/.npm/_logs/2020-03-14T13_45_22_282Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] publish: `npm publish && git push --tags`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] publish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/nhoizey/.npm/_logs/2020-03-14T13_45_22_316Z-debug.log

> [email protected] publish .
> npm publish && git push --tags


The project was rolled back to its previous state.

The Publishing package using npm step fails

I see the πŸ“¦ [email protected] log is there twice, and npm error message is "You cannot publish over the previously published versions: 0.3.0".

When I look on https://www.npmjs.com/package/images-responsiver the version has been published indeed.

But local state has been rolled back to previous version.

Steps to reproduce

  1. run np minor
  2. see it fail

Expected behavior

I would expect it not to fail. πŸ˜…

Environment

np - 6.2.0
Node.js - 13.6.0
npm - 6.13.6
Git - 2.24.1
OS - macOS 10.15.3

Most helpful comment

Sorry, I had a publish task in my package.json… πŸ€¦β€β™‚οΈ

>All comments

Sorry, I had a publish task in my package.json… πŸ€¦β€β™‚οΈ

Was this page helpful?
0 / 5 - 0 ratings

Related issues

artivilla picture artivilla  Β·  5Comments

bennycode picture bennycode  Β·  4Comments

bennycode picture bennycode  Β·  4Comments

fregante picture fregante  Β·  5Comments

xxczaki picture xxczaki  Β·  6Comments