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

196
Views
node-fetch -- typeof import("[...]/node-fetch/index")' has no call signatures

Copied from here: https://github.com/node-fetch/node-fetch#json ... my code:

const fetch = require('node-fetch');

async function doFetch() {
    const response = await fetch('https://api.github.com/users/github');
    const data = await response.json();

    console.log(data);
}

doFetch()

Error message -- referring to the fetch('https://...) call:

This expression is not callable.
Type 'typeof import("[...]/node_modules/@types/node-fetch/index")' has no call signatures.

I've searched this and other sites, and this error seems pretty common with many modules, although I can only find fixes for examples using import instead of require. I'm guessing it's pretty simple, but I just can't figure out how to fix this with require syntax.

What am I doing wrong? Thanks in advance!


If it matters: JavaScript (not TypeScript). node.js. VSCode on Mac. The error message is generated by the dbaeumer.vscode-eslint plugin.


over 4 years ago · Santiago Trujillo
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!