fent / fent/node-ytdl-core

Miniget 410 when checking for updates

Open
#1,260 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.7k
Forks
852
PR merge metrics
No merged PRs in 30d

Description

When i try to use ytdl-core or any package that depends on it, it fails with the following error:

```
199 | Date.now() - exports.lastUpdateCheck >= UPDATE_INTERVAL) {
200 | exports.lastUpdateCheck = Date.now();
201 | return miniget('https://api.github.com/repos/fent/node-ytdl-core/releases/latest', {
202 | headers: { 'User-Agent': 'ytdl-core' },
203 | }).text().then(response => {
204 | if (JSON.parse(response).tag_name !== `v${pkg.version}`) {
^
SyntaxError: JSON Parse error: Unrecognized token 'ߋ'
at /Users/braelynboynton/Developer/spotlight/services/api/node_modules/ytdl-core/lib/utils.js:204:10
at processTicksAndRejections (:1:2602)
11 | // `request`, `response`, `abort`, left out, miniget will emit these.
12 | const requestEvents = ['connect', 'continue', 'information', 'socket', 'timeout', 'upgrade'];
13 | const responseEvents = ['aborted'];
14 | Miniget.MinigetError = class MinigetError extends Error {
15 | constructor(message, statusCode) {
16 | super(message);
^
error: Status code: 410
at new MinigetError (/Users/braelynboynton/Developer/spotlight/services/api/node_modules/miniget/dist/index.js:16:8)
at /Users/braelynboynton/Developer/spotlight/services/api/node_modules/miniget/dist/index.js:206:26
at node:http:865:28
at processTicksAndRejections (:1:2602)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.