np
np copied to clipboard
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 [email protected].
Steps to reproduce
- Install [email protected]
- 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
Having the same issue, failing at Enabling two-factor authentication
, but my package is still being published.
EDIT: Does work with [email protected] as stated above. :-)
Environment np - 6.1.0 node - 10.14.2 npm - 6.12.0 Git - 2.20.1 OS - macOS 10.15.3
I'm having this issue too
@riccardoscalco @davidohlin @DannyFeliz Can you reproduce this with np v6.2.0? This might have been fixed in #497.
Same issue here!
@itaisteinherz the issue persists for me with 6.2.0 unfortunately
I can also verify the issue still persists in 6.2.0.
Any 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.
I just ran into this issue with the latest release (6.2.0
). Can I completely disable 2FA?
The package ended up being released on npm but did not push to github or create the release tags.
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 issue
I have the same issue when trying to publish a scoped package for the first time using [email protected]
.
Can someone verify if this issue is reproducible? For me, 2FA worked without a hiccup on the latest release of np
Can someone verify if this issue is reproducible? For me, 2FA worked without a hiccup on the latest release of
np
It is a long time since I last saw this error.
Can someone verify if this issue is reproducible? For me, 2FA worked without a hiccup on the latest release of
np
Yes, verifying the error was still reproducible with [email protected]. 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.
@glennreyes that's interesting, how did it fail the first time? It worked the second time without any setup changes, right?
Do you have any additional log we can use to debug, for me its still going through successfully when I try with 2FA.
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/Users/agney/.nvm/versions/node/v13.11.0/bin/node',
1 verbose cli '/Users/agney/.nvm/versions/node/v13.11.0/bin/npm',
1 verbose cli 'access',
1 verbose cli '2fa-required',
1 verbose cli '@agney/react-loading'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session ecbd5b6d0caae905
5 http fetch POST 503 https://registry.npmjs.org/-/package/%40agney%2Freact-loading/access 544ms
6 verbose stack Error: 503 Service Unavailable - POST https://registry.npmjs.org/-/package/%40agney%2Freact-loading/access - Service Unavailable
6 verbose stack at /Users/agney/.nvm/versions/node/v13.11.0/lib/node_modules/npm/node_modules/npm-registry-fetch/check-response.js:104:15
6 verbose stack at processTicksAndRejections (internal/process/task_queues.js:97:5)
7 verbose statusCode 503
8 verbose pkgid @agney/react-loading@latest
9 verbose cwd /Users/agney/code/run-throughs/new-spinner
10 verbose Darwin 19.3.0
11 verbose argv "/Users/agney/.nvm/versions/node/v13.11.0/bin/node" "/Users/agney/.nvm/versions/node/v13.11.0/bin/npm" "access" "2fa-required" "@agney/react-loading"
12 verbose node v13.11.0
13 verbose npm v6.14.2
14 error code E503
15 error 503 Service Unavailable - POST https://registry.npmjs.org/-/package/%40agney%2Freact-loading/access - Service Unavailable
16 verbose exit [ 1, true ]
This is the NPM log when it happens. The package was successfully published though.
Can someone verify if this issue is reproducible? For me, 2FA worked without a hiccup on the latest release of np
I can no longer replicate the same problem with the latest release 6.5.0.
Could this be an npm
issue? I never experienced issues with this step, but it appears to me it has something to do with scoped packages. I keep executing the command manually but it doesn't work, constantly returning a 503.
has this error
seems like after adding node_modules into .gitignore, the error disappeared
-
Use
np --no-2fa
if you're encountering this issue - Report to npm if
npm access 2fa-required
is failing, to understand why - That command is reportedly being removed by npm, so this issue is out of date