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

No docs on how to publish public scoped packages #914

Closed
cdaringe opened this Issue Jul 11, 2017 · 7 comments

Comments

Projects
None yet
6 participants
@cdaringe
Copy link
Contributor

cdaringe commented Jul 11, 2017

Expected Behavior

  • able to lerna publish public scoped packages

Current Behavior

lerna ERR! execute  Error: Command failed: npm publish --tag latest
lerna ERR! execute npm ERR! publish Failed PUT 402
lerna ERR! execute npm ERR! Darwin 15.6.0
lerna ERR! execute npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "publish" "--tag" "latest"
lerna ERR! execute npm ERR! node v7.10.0
lerna ERR! execute npm ERR! npm  v4.2.0
lerna ERR! execute npm ERR! code E402
lerna ERR! execute
lerna ERR! execute npm ERR! You need a paid account to perform this action.

Possible Solution

  • get some docs on how to do so. the readme suggests that this is supported. i'll submit the patch if i can find the info!

Steps to Reproduce (for bugs)

  • lerna publish in a project compose of scoped packages
@zxqfox

This comment has been minimized.

Copy link

zxqfox commented Jul 11, 2017

In npm: npm publish --access public

Please try: lerna publish -- --access public
Does it work?

p.s I have scoped packages too and want to use lerna to publish them all.

@cdaringe

This comment has been minimized.

Copy link
Contributor

cdaringe commented Jul 11, 2017

@zxqfox, same error as above

@robdonn

This comment has been minimized.

Copy link

robdonn commented Jul 23, 2017

I'm running into the same problem. A temporary solution may be a custom script.

In the root package.json:
"publish-npm": "lerna publish --skip-npm && lerna run publish-npm"

Then in each package json you could have:
"publish-npm": "npm publish --access public"

@akosyakov

This comment has been minimized.

Copy link

akosyakov commented Jul 24, 2017

Does anybody try: #178 (comment)?

@hshoff

This comment has been minimized.

Copy link

hshoff commented Jul 27, 2017

Yes the solution in #178 (comment) works for publishing scoped packages. Check out https://github.com/hshoff/vx for an example repo. It's been working for me since March when I started the project.

As mentioned in #178 (comment), the solution is to add the following to each packages package.json:

  "publishConfig": {
    "access": "public"
  }
@evocateur

This comment has been minimized.

Copy link
Member

evocateur commented Aug 24, 2017

PRs welcome to add this solution to the documentation

myabc added a commit to OUP/javascript that referenced this issue Nov 1, 2017

cezaraugusto added a commit to cezaraugusto/lerna that referenced this issue Nov 24, 2017

@cezaraugusto cezaraugusto referenced this issue Nov 24, 2017

Merged

add docs on how to publish scoped packages #1139

4 of 9 tasks complete

evocateur added a commit that referenced this issue Nov 28, 2017

@lock

This comment has been minimized.

Copy link

lock bot commented Dec 27, 2018

This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 27, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.