[BUG] getting a `Failed to read _auth from ~/.npmrc` with Node v20
@kay-schecker is already working on this.
Since Feb 25, 2025.
Assessment
This issue has not been assessed yet.
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
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 209
- Avg merge
- 9h 35m
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from OpenAPITools/openapi-generator-cli
-
[FEATURE] consider using caret ranges instead of pinned exact versions for runtime dependenciesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
[BUG] JAVA_OPTS is incorrectly evaluatedMay be free again @kay-schecker claimed this 122 days ago, and no pull request is open. Openbug
OpenAPITools/openapi-generator-cli#1213 · 1 assignee ·
-
[BUG] Proxy configuration of NPM not used when downloading .jar via version managerMay be free again @kay-schecker claimed this 177 days ago, and no pull request is open. Openbug
OpenAPITools/openapi-generator-cli#1190 · 1 assignee ·
-
[BUG] openapiGeneratorIgnoreList is missing from schemaMay be free again @kay-schecker claimed this 227 days ago, and no pull request is open. Openbug
OpenAPITools/openapi-generator-cli#1138 · 1 comment · 1 assignee ·
-
[BUG] Environment variable not found (missing .env loading)May be free again @kay-schecker claimed this 266 days ago, and no pull request is open. Openbug
OpenAPITools/openapi-generator-cli#1094 · 1 comment · 1 assignee ·
All issues in OpenAPITools/openapi-generator-cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
external-issue to-triage
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
diegosouzapw/OmniRoute#15401 ·
Maintainers usually reply within 2 days
-
Sign the pledgeOpen
Difficulty 1/5 Under an hour Newbie friendliness 95/100
input-output-hk/devx-updates#163 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
code-yeongyu/oh-my-openagent#9454 ·
Maintainers usually reply within 1 day