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

Use the full relative path when npm publishing (fixes an issue with npm@7 publishing) #53

Merged
merged 1 commit into from
Apr 19, 2021

Conversation

nilzona
Copy link
Contributor

@nilzona nilzona commented Apr 17, 2021

closes #51

@nilzona nilzona changed the title fix: add to relative path on publish fix: add ./ to relative path on publish Apr 17, 2021
@stefanvanherwijnen
Copy link

stefanvanherwijnen commented Apr 18, 2021

With this PR it does not seem to read the current version for me:

🚀 Let's release package (currently at 0.0.0)

Edit: Actually, this might be an issue with a non existing release on github.
I do get npm errors:

npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in.
npm ERR! need auth You need to authorize this machine using `npm adduser`

I am logged in to npm to I am not sure why it is not authorized.

Edit2:
Solved by adding

  "publishConfig": {
    "registry": "https://registry.npmjs.org/"
  }

to the packages.

@scalvert
Copy link
Collaborator

Is this specifically looking at resolving the compatibility issue with npm v7? Just trying to confirm the scope of the problem.

@scalvert
Copy link
Collaborator

Reading the referenced issue this seems to be the case. Thanks for this PR. I'll verify this, as I have a package that I ran into this problem with that also needs a publish.

@nilzona
Copy link
Contributor Author

nilzona commented Apr 19, 2021

hey @scalvert. I actually didn't test this with npm < v7 so I can't tell for sure, but from what I can read this is a npm 7 problem as you pointed out and also a npm 6 problem if the folder name was different from the package name (not verified by me though).

@rwjblue rwjblue added the bug Something isn't working label Apr 19, 2021
@rwjblue rwjblue merged commit a6167e0 into release-it-plugins:master Apr 19, 2021
@rwjblue
Copy link
Collaborator

rwjblue commented Apr 19, 2021

Thank you @nilzona!

@rwjblue rwjblue changed the title fix: add ./ to relative path on publish Use the full relative path when npm publishing (fixes an issue with npm@7 publishing) Apr 19, 2021
@nilzona nilzona deleted the fix-publish branch April 19, 2021 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

monorepo with workspaces fails to publish to npm
4 participants