Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

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

Aberta
#881 1 comentário 0 reações 1 responsável Ver no GitHub

@kay-schecker já está trabalhando nisso.

Desde 25/2/2025.

Avaliação

Esta issue ainda não foi avaliada.

Descrição

bug

🐛 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
Linguagem predominante
TypeScript
Estrelas
2k
Forks
211
Merge médio
1d 10h
PRs com merge (30d)
2

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de OpenAPITools/openapi-generator-cli

Todas as issues de OpenAPITools/openapi-generator-cli

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.