-
-
Notifications
You must be signed in to change notification settings - Fork 301
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
Failed within np
,scoped package
,publishConfig.registry
#424
Comments
It seems like the issue's origin is in
Which is identical to the one you got when using |
It would be great if you could open a bug report for this over at npm. |
like I said.
I mean // package.json
{
"publishConfig": {
"registry": "https://registry.npmjs.org/",
"access": "public"
},
}
|
I just remembered #356, in which I implemented |
Hello, i'm struggling with same issue.
And as a result i got this
Note that after npm access it POSTs to official npmjs registry?! |
@itaisteinherz Is this fixed now? If not, what else needs to be done. |
@sindresorhus See #429 (review). Merging #429 is the last thing I think. |
Description
I failed the scoped package publish process within
publishConfig.registry
inpackage.json
usingnp
But works fine without
publishConfig.registry
Error message is:
I dive into the code and found this:
So once If
publishConfig.registry
is declared inpackage.json
, it'll directly point out the packageisAvailable
,(Even if it is also
https://registry.npmjs.org/
, and already a package there)(Why this move? Because I'm using a mirror registry for package install speed, and this field will lock the publish registry and save my life.)
So that will trigger
enable2fa()
andnpm access 2fa-required
Which in my case break the pulish process
(Becasue I found it maybe a problem with npm 2fa feature)
(And also I want to keep simple, to not use 2fa)
Steps to reproduce
I made a very simple repo here: https://github.com/seognil/npm-feature-test
and npm address here: https://www.npmjs.com/package/@seognil-playground/npm-feature-test
Won't work
publishConfig.registry
inpackage.json
np --yolo
(without test)Will work
publishConfig
fieldnp --yolo
(without test)Expected behavior
I don't know if the code logic above is a feature or something...
But I thought there is one problem and one suggestion
The problem: the
isAvailable
logic may be improvedThe suggestion: an option of np-cli to skip 2FA anyway
So It will not break the publish process in my case...
And Thanks for the tool by the way, really helps :)
Notice that there are already some issues maybe related,
I'd also check that later
Environment
np - 5.0.2
Node.js - v12.1.0
npm - 6.9.0
Git - 2.21.0
OS - 64bit Mac OS X 10.14.5 18F132
The text was updated successfully, but these errors were encountered: