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

284
Views
getaddrinfo ENOTFOUND api.telegram.org (Telegraf)

This is my code

const config = require('./config.json');
const {Telegraf} = require('telegraf');
// require('dotenv').config();
const bot = new Telegraf(config.BOT_TOKEN);
bot.use((ctx) => {
    ctx.reply('Bot has started');
});
bot.launch()

every time I run this code it give me error and the error is

D:\Danish\Node testing\Node Bot Testing\node_modules\node-fetch\lib\index.js:1491 reject(new FetchError(request to ${request.url} failed, reason: ${err.message}, 'system', err)); ^ FetchError: request to https://api.telegram.org/bot5121286363:[REDACTED]/getMe failed, reason: getaddrinfo ENOTFOUND api.telegram.org at ClientRequest. (D:\Danish\Node testing\Node Bot Testing\node_modules\node-fetch\lib\index.js:1491:11) at ClientRequest.emit (node:events:527:28) at TLSSocket.socketErrorListener (node:_http_client:454:9) at TLSSocket.emit (node:events:527:28) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21) { type: 'system', errno: 'ENOTFOUND', code: 'ENOTFOUND' } [nodemon] app crashed - waiting for file changes before starting...

about 4 years ago · Juan Pablo Isaza
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!