Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!