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

[BUG](libnpmpublish) About 4.0.1 upgrade npm-registry-fetch from 9.0.0 to 10.0.0 #4249

Closed
gaokun opened this issue May 14, 2021 · 4 comments
Closed
Labels
Needs Triage needs review for next steps ws:libnpmpublish Related to the libnpmpublish workspace.

Comments

@gaokun
Copy link

gaokun commented May 14, 2021

What / Why

npm-registry-fetch version shows there are incompatible API changes.
And libnpmpublish use opts as params, not generate & use it inside.
So libnpmpublish just released above change as patch, is this ok?

What am I facing

In a word: I use lerna to publish packages, but failed by authorization.

Root Cause

Here are dependencies:

lerna@^4.0.0
   ┗━━ @lerna/publish@^4.0.0
          ┣━━npm-registry-fetch@^9.0.0
          ┗━━@lerna/npm-publish@^4.0.0
                ┗━━libnpmpublish@^4.0.0
                       ┗━━npm-registry-fetch@^10.0.0

lerna publishes package chain: @lerna/publish -> @lerna/npm-publish -> libnpmpublish
In fact, yarn installed [email protected] coz ^4.0.0, it make sense.
So I have two version npm-registry-fetch,

@lerna/publish build opts via npm-registry-fetch@^9.0.0
and
[email protected] get auth failed from opts via npm-registry-fetch@^10.0.0

Finally, I got error:
lerna ERR! E401 Unable to authenticate, need: BASIC realm="Sonatype Nexus Repository Manager"

Workaround

add this to package.json

{
  "resolutions": {
    "libnpmpublish": "4.0.0"
  },
}

Who

I think we should release 4.0.2 to downgrade npm-registry-fetch to 9
then release 5.0.0 to upgrade it to 10

@gaokun gaokun changed the title [QUESTION] About 4.0.1 upgrade npm-registry-fetch from 9.0.0 to 10.0.0 [BUG] About 4.0.1 upgrade npm-registry-fetch from 9.0.0 to 10.0.0 May 19, 2021
@gaokun
Copy link
Author

gaokun commented May 24, 2021

@ruyadorno
Please check this when you are available.

Thank you
Ken

@dptoot
Copy link

dptoot commented Jun 2, 2021

This issue is essentially disallowing Lerna v4 from being used via private npm repos. Is there anyway we can address this?

@gaokun
Copy link
Author

gaokun commented Jun 4, 2021

@nlf
Hi, could you please help to check this issue,

I notice that 4.0.2 was published, and upgrade npm-registry-fetch to 11

@fritzy fritzy transferred this issue from npm/libnpmpublish Jan 18, 2022
@fritzy fritzy added Needs Triage needs review for next steps ws:libnpmpublish Related to the libnpmpublish workspace. labels Jan 18, 2022
@fritzy fritzy changed the title [BUG] About 4.0.1 upgrade npm-registry-fetch from 9.0.0 to 10.0.0 [BUG](libnpmpublish) About 4.0.1 upgrade npm-registry-fetch from 9.0.0 to 10.0.0 Jan 18, 2022
@lukekarrys
Copy link
Contributor

This is handled by #4427.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Triage needs review for next steps ws:libnpmpublish Related to the libnpmpublish workspace.
Projects
None yet
Development

No branches or pull requests

4 participants