Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

175
Vistas
node-fetch ignores query string with commander.js

I created a CLI with commander.js that I have published via npm. The CLI uses node-fetch to request data from an API. However, for some users of my CLI, node-fetch is ignoring the query string in my fetch URL.

My assumption is that the some users have an older version of node-fetch installed and it is using that version instead of the explicit version in my dependencies list in package.json.

If this is the reason, how can I ensure that the correct version of node-fetch is used with my CLI?

Are there any other reasons you can think of that would cause some environments to ignore the query string?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

To assert this problem you can write tests. Then execute those tests using different versions of node-fetch to see if that's really the problem.

A simpler way to solve it (assuming it is the real problem), could be to set the exact version of node-fetch that you want your users to install in your package.json, using npm's versioning notation.

So, for example:

  • "1.0.0" Must match version exactly
  • ">1.0.0" Must be greater than version
  • ">=1.0.0" Etc.
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda