negezor / vk-io

Modern VK API SDK for Node.js
https://npm.im/vk-io
MIT License
548 stars 85 forks source link

StartUp Error #464

Closed sizeoftrickster closed 2 years ago

sizeoftrickster commented 2 years ago

Hi all, I had a problem when using the "svg-to-img" library.

const svgToImage = require('svg-to-img');
const { VK, Updates } = require('vk-io');

const { token, groupId } = require('./config.json');

const vk = new VK ({
    token: token,
    group_id: groupId
});

...

vk.updates.start()
.then( ... )
.catch( ... )

When the bot is started with "svg-to-img", I get this error, without "svg-to-img" there is no error.

FetchError: request to https://api.vk.com/method/groups.getById failed, reason: connect ECONNREFUSED ::1:443
    at ClientRequest.<anonymous> (file:///C:/Users/USER/123/123/node_modules/node-fetch/src/index.js:95:11)
    at ClientRequest.emit (node:events:402:35)
    at TLSSocket.socketErrorListener (node:_http_client:447:9)
    at TLSSocket.emit (node:events:390:28)
    at emitErrorNT (node:internal/streams/destroy:164:8)
    at emitErrorCloseNT (node:internal/streams/destroy:129:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  erroredSysCall: 'connect'
}
MrZillaGold commented 2 years ago

Похоже, в вашей стране заблокирован ВКонтакте, используйте VPN. Простое подключение общедоступного модуля не может влиять на обращение к HTTP серверу.