Np: 2FA fails with 400 Bad Request on initial package publish

Created on 4 Jun 2019  Â·  6Comments  Â·  Source: sindresorhus/np

Description

I created a new package, got it all ready, and I go to publish it with np but on initial publish I get

✖ Command failed: npm access 2fa-required PACKAGE_NAME
npm ERR! code E400
npm ERR! 400 Bad Request - POST https://registry.npmjs.org/-/package/PACKAGE_NAME/access

Steps to reproduce

  1. mkdir MyAwesomeNPTest && cd MyAWesomeNPTest
  2. npm init then do what you need to make it a valid package for np publish, like make the test script empty so it passes...
  3. npx bin np

Expected behavior

I expect a bunch of happy output, probably ending in a rocket ship emoji ;-)

Environment

np - 5.0.2
Node.js - 12.2.0
npm - 6.9.0
Git - 2.20.1
OS - Ubuntu 19.04

Most helpful comment

It is worth noting that the package did successfully publish.
The 2FA failure interrupted the process so git push --tags didn't execute and the release draft wasn't opened, but np did it's main job: get the release out, so that's useful

All 6 comments

It is worth noting that the package did successfully publish.
The 2FA failure interrupted the process so git push --tags didn't execute and the release draft wasn't opened, but np did it's main job: get the release out, so that's useful

Note that this is quite similar to #424, and so the two issues might be caused by the same problem.

Same thing happening to me :/

2020-07-18T07_38_21_727Z-debug.log

This is still happening. And there are at least two bugs for this issue, this one and #494 .

It would be nice to have a way to continue the process when something breaks as well.

Closing out old issues / personal git cleaning... - closing in pref to #494

Was this page helpful?
0 / 5 - 0 ratings

Related issues

doug-wade picture doug-wade  Â·  5Comments

jescalan picture jescalan  Â·  3Comments

papb picture papb  Â·  6Comments

bennycode picture bennycode  Â·  4Comments

fregante picture fregante  Â·  5Comments