Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
nhoizey opened this issue Mar 14, 2020 · 1 comment
Closed

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

nhoizey opened this issue Mar 14, 2020 · 1 comment

Comments

@nhoizey
Copy link

nhoizey commented Mar 14, 2020

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 📦  images-responsiver@0.3.0
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 📦  images-responsiver@0.3.0
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! images-responsiver@0.3.0 publish: `npm publish && git push --tags`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the images-responsiver@0.3.0 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

> images-responsiver@0.3.0 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 📦 images-responsiver@0.3.0 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

@nhoizey
Copy link
Author

nhoizey commented Mar 14, 2020

Sorry, I had a publish task in my package.json… 🤦‍♂️

@nhoizey nhoizey closed this as completed Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant