np: 503 Service Unavailable at step Enabling two-factor authentication
Description
np stops at step Enabling two-factor authentication with error 503 Service Unavailable.
This error seems a consequence of the fact that np tells me
This scoped repo @nextbitlabs/onepunch hasn't been published. Do you want to publish it publicly?
where the repo has already been published instead.
Looking at the code, line https://github.com/sindresorhus/np/blob/master/source/ui.js#L143 seems a relevant place to start debugging, in particular condition !options.availability.isAvailable.
Please note that the error does not happen with np@5.2.1.
Steps to reproduce
- Install np@6.0.0
- Use np to publish a scoped module that has been already published in npm.
Expected behavior
Step Enabling two-factor authentication should not happen, the repo has been already published with two-factor authentication enabled.
np should understand that the package is already published.
Environment
np - 6.0.0 Node.js - 12.5.0 npm - 6.13.6 Git - 2.20.0 OS - macosx 10.14.6
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 19
- Comments: 20 (1 by maintainers)
Commits related to this issue
- [deps] Downgrade np because of a publish bug See https://github.com/sindresorhus/np/issues/504 — committed to studiokloek/ts-core-lib by naranjamecanica 4 years ago
I have exactly the same issue with
6.2.1. Waiting for a fix… 🙏EDIT: on
6.2.3-> partially fixed, it works when you previously published your lib on npm. But when it is first time, you still have same issueAny fix for this? New user here trying to use this awesome tool to publish my package. It publishes fine but I miss out on the remaining features after 2FA error.
@itaisteinherz the issue persists for me with 6.2.0 unfortunately
This is the NPM log when it happens. The package was successfully published though.
Yes, verifying the error was still reproducible with np@6.5.0. For some reason I can see the package on npm, but 404 when I try to access under the npm package url.
Update: It just worked on the second attempt without any commits in between releases. Also the page show up now.
It is a long time since I last saw this error.