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 #20731

Open
2 of 6 tasks
holamau opened this issue Feb 25, 2025 · 1 comment
Open
2 of 6 tasks

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

holamau opened this issue Feb 25, 2025 · 1 comment

Comments

@holamau
Copy link

holamau commented Feb 25, 2025

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

When running openapi-fetch I get a Failed to read _auth from ~/.npmrc error.

My .npmrc file has the new _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, it works

openapi-generator version

2.16.3 on my package.json

"@openapitools/openapi-generator-cli": "^2.16.3",

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

@holamau
Copy link
Author

holamau commented Feb 25, 2025

maybe this belongs in https://github.com/OpenAPITools/openapi-generator-cli/issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant