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

rush publish fail. #3617

Open
takegine opened this issue Sep 7, 2022 · 2 comments
Open

rush publish fail. #3617

takegine opened this issue Sep 7, 2022 · 2 comments
Projects

Comments

@takegine
Copy link

takegine commented Sep 7, 2022

im sorry to write here , but i had no idea.

I'm going to replace lerna with rush, but I'm having trouble releasing the package of Organizations.

when i ran rush publish -p -a,i got these error

 You should bug the author to publish it (or use the name yourself!)

I checked npm whoami and it printed out my npm account,then republish still fails.
i npm login again , then republish still fails.

i had try get new Access Tokens in npmjs.com, and ran rush publish -p --include-all -n npm_.., it works.

This is too complicated, how can I use it correctly?

@iclanton
Copy link
Member

Rush uses the common/config/rush/.npmrc-publish npmrc file during publishing. Make sure that contains the settings that you expect for publishing. The one in this repo puts the NPM auth token in an environment variable called NPM_AUTH_TOKEN that we populate during the publishing pipeline from a pipeline secret (see here).

This is designed around publishing using an account for the package feed (whether it's the public npm feed or a private feed on another service, like Azure DevOps) with credentials only accessible to a few pipelines. If you want to just publish packages manually from your local machine, you should be able to just delete the common/config/rush/.npmrc-publish and common/config/rush/.npmrc files, and Rush will use your ~/.npmrc instead. Keep in mind that this will use your profile .npmrc for everything, including rush install.

@iclanton iclanton added this to General Discussions in Bug Triage Sep 12, 2022
@BryanAdamss
Copy link

Rush uses the common/config/rush/.npmrc-publish npmrc file during publishing. Make sure that contains the settings that you expect for publishing. The one in this repo puts the NPM auth token in an environment variable called NPM_AUTH_TOKEN that we populate during the publishing pipeline from a pipeline secret (see here).

This is designed around publishing using an account for the package feed (whether it's the public npm feed or a private feed on another service, like Azure DevOps) with credentials only accessible to a few pipelines. If you want to just publish packages manually from your local machine, you should be able to just delete the common/config/rush/.npmrc-publish and common/config/rush/.npmrc files, and Rush will use your ~/.npmrc instead. Keep in mind that this will use your profile .npmrc for everything, including rush install.

why i use rush publish -a -b main --add-commit-details --set-access-level public -p its not working?( It notice Rush publish finished successfully. but not publish to npm)

and use rush publish --apply --publish --include-all --target-branch main --add-commit-details --set-access-level public reference from here its working.

What is the difference between these two commands?

It seems like is --include-all parameter make effect, but i saw this parameter is use in pack mode on this doc , and Is it related to shouldPublish field?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: General Discussions
Bug Triage
  
General Discussions
Development

No branches or pull requests

3 participants