OpenAPITools / OpenAPITools/openapi-generator-cli
[BUG] getting a `Failed to read _auth from ~/.npmrc` with Node v20
@kay-schecker is already working on this.
Since Feb 25, 2025.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 208
- Avg merge
- 7h 12m
- Merged PRs (30d)
- 6
Description
🐛 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
this is a redacted screenshot of the openapi-fetch execution through an npm script
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.