consumet / consumet.ts

Nodejs library that provides high-level APIs for obtaining information on various entertainment media such as books, movies, comic books, anime, manga, and so on.
https://consumet.org/extensions/list/
GNU General Public License v3.0
393 stars 222 forks source link

Error: Cannot read properties of undefined (reading 'reverse') #441

Closed richardogcc closed 5 months ago

richardogcc commented 8 months ago

Describe the bug

META.Anilist.Manga(); fetchMangaInfo(97864) results on error

Steps to reproduce

I'm using Express with "@consumet/extensions"

To reproduce the error you should have next code:

import { META} from "@consumet/extensions";
import express from "express";
import cors from "cors";

const PORT = process.env.PORT || 3001;

const app = express();

app.use(cors());
app.use(express.json());

app.get("/api/mangaInfo", async (req, res) => {
  try {
    const { mangaId } = req.query;

    if (!mangaId) {
      return res.status(400).send({error: "Bad Request"});
    }

    const metaAniList = new META.Anilist.Manga();
    const manga = await metaAniList.fetchMangaInfo(mangaId);

    if (manga) return res.status(200).send(manga);
    else return res.status(404).send("Not Found");
  } catch (error) {
    return res.status(500).send({error: error.message});
  }
});

app.listen(PORT, () => {
  console.log(`http://localhost:${PORT}`);
});

Expected behavior

This code should returns an object with manga information.

Actual behavior

Error: Cannot read properties of undefined (reading 'reverse') at Manga.fetchMangaInfo (M:\Work\node\mangaScraper\node_modules\@consumet\extensions\dist\providers\meta\anilist.js:1837:23) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async file:///M:/Work/node/mangaScraper/index.js:85:19

Additional context

Using the META Anilist for manga query I am running into a problem when trying to query the manga whose ID is "97864".

stale[bot] commented 6 months ago

We're marking this issue as wontfix because it has not had recent activity. It will be closed if no further activity occurs within the next 30 days. Thank you for your contributions.

stale[bot] commented 5 months ago

We are closing this issue. If the issue still persists in the latest version of consumet.ts, please reopen the issue and update the description. We will try our best to accomodate it!