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

.npmrc auth content will be ignored when I supply a .npmrc file local #1076

Closed
2 of 5 tasks
yunnysunny opened this issue Jun 6, 2024 · 5 comments
Closed
2 of 5 tasks
Assignees
Labels
bug Something isn't working

Comments

@yunnysunny
Copy link

Description:
When I supply a .npmrc file local, I run npm publish failed with NEEDEDAUTH error. But when I delete the local .npmrc, it will publish success in github action.
The failed github action: https://github.com/whyun-demo/pnpmfile/actions/runs/9395413589
The success github action : https://github.com/whyun-demo/pnpmfile/actions/runs/9395562736/job/25875171087

Action version:
actions/setup-node@v4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
pnpm 9

Repro steps:
I put a .npmrc file under the root of my project as follows:

registry="https://registry.npmjs.com"
enable-pre-post-scripts=true

And run npm publish in github action.
Expected behavior:
It should publish to npmjs success.

Actual behavior:
Result with NEEDEDAUTH error.

@yunnysunny yunnysunny added bug Something isn't working needs triage labels Jun 6, 2024
@HarithaVattikuti
Copy link
Contributor

Hello @yunnysunny
Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.

@mahabaleshwars
Copy link

Hello @yunnysunny,

The problem you are encountering is due to:

The registry URL in the .npmrc file is incorrect.
It should be ""https://registry.npmjs.org"" instead of ""https://registry.npmjs.com"".

Please let us know if this resolves your issue. If the issue persists, please consider sharing a public repository to help diagnose the problem.

@mahabaleshwars
Copy link

Hello @yunnysunny, could you please confirm if the feedback addresses your concern?

@yunnysunny
Copy link
Author

@mahabaleshwars Thank you very much, it works ok now.

@mahabaleshwars
Copy link

Hello @yunnysunny,

Thank you for confirming. We will now close this ticket. Please feel free to reach out if you have any other concerns.

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

No branches or pull requests

3 participants