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] getting a Failed to read _auth from ~/.npmrc with Node v20 #881

Open
holamau opened this issue Feb 25, 2025 · 1 comment
Open

[BUG] getting a Failed to read _auth from ~/.npmrc with Node v20 #881

holamau opened this issue Feb 25, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@holamau
Copy link

holamau commented Feb 25, 2025

🐛 Bug Report:

Describe the bug

When running openapi-fetch or other openapi commands, I get the following error:

Failed to read _auth from ~/.npmrc

My .npmrc file has the newer _auth syntax, which is how it is configured on NodeJS v20:

//registry.npmjs.org/:_auth=<auth_token>

Feels like openapi-generator is not supporting the newer _auth syntax for NodeJS v20?

If I run it with NodeJS v16 and the old _auth=<auth_token> syntax, works as expected

Steps to Reproduce

this is a redacted screenshot of my .npmrc file

Image

this is a redacted screenshot of the openapi-fetch execution through an npm script

Image

Expected behavior

when running openapi commands like openapi-fetch via npm, it should be getting the _auth information on .npmrc config file, which is valid syntax for NodeJS v20

Screenshots

Submitted on Steps to reproduce

Operation System (please complete the following information):

  • OS: macOS
  • Version 15.3.1

Package System (please complete the following information):

  • node: v20.18.3
  • npm: v10.8.2
  • openapitools/openapi-generator-cli: ^2.16.3
@holamau holamau added the bug Something isn't working label Feb 25, 2025
@holamau
Copy link
Author

holamau commented Feb 25, 2025

I added this on openapi-generator issue tracker, but I think it belongs here as it is more broadly related to the CLI rather than the generator itself. Thank you in advance for any pointers.

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

2 participants