D
D
dicem2018-04-26 15:37:44
Node.js
dicem, 2018-04-26 15:37:44

Why won't the NPM server start?

I am making a bot for telegrams, but at the very beginning I ran into the following problem.
The local server fails to start with the following error:

[nodemon] 1.17.3
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node index.js`
node-telegram-bot-api deprecated Automatic enabling of cancellation of promises is deprecated.
In the future, you will have to enable it yourself.
See https://github.com/yagop/node-telegram-bot-api/issues/319. module.js:643:30
error: [polling_error] {"code":"EFATAL","message":"EFATAL: Error: getaddrinfo ENOTFOUND api.telegram.org api.telegram.org:443"}

The error is badly googled.
All that contains my index.js:
const TelegramBot = require('node-telegram-bot-api')

const TOKEN = '///'

const bot = new TelegramBot(TOKEN, {
    polling: true
})

bot.onText(/\/start/, msg => {
    console.log(msg)
})

I suspected that the whole problem was in mass blocks, I tried to use free proxies for npm:
proxy=http://190.2.133.216:1080
https-proxy=http://162.220.52.141:3128
from hidemy.name .
However, a dead number. Help people!!!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dicem, 2018-04-26
@dicem

In general, I found the solution myself. The most elementary, downloaded a program of one VPN service. Apparently the proxies in the npm configs do not apply to node.js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question