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

191
Vistas
Getting errors while using 'got' package

I am using 'got' version '11.8.3' and I am getting below error.

/app/node_modules/got/dist/source/core/index.js:696 throw new TypeError('The payload has been already provided'); ^ TypeError: The payload has been already provided at Request.onLockedWrite (/app/node_modules/got/dist/source/core/index.js:696:19) at PassThrough. (node:internal/streams/pipeline:323:31)

Hence I tried to upgrade 'got' to latest (12.0.3). But after this I am getting below error:

/app/server/lib/my-api.js:8 const got_1 = __importDefault(require("got")); ^ Error [ERR_REQUIRE_ESM]: require() of ES Module /app/node_modules/got/dist/source/index.js from /app/server/lib/my-api.js not supported. Instead change the require of index.js in /app/server/lib/my-api.js to a dynamic import() which is available in all CommonJS modules.

However, I am using this statement in my .ts file. import got from 'got'

Can you suggest on eliminating these errors

about 4 years ago · Santiago Gelvez
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