Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get property 'link' of undefined. #9

Open
xaxa-0x3F opened this issue May 18, 2021 · 2 comments
Open

Cannot get property 'link' of undefined. #9

xaxa-0x3F opened this issue May 18, 2021 · 2 comments

Comments

@xaxa-0x3F
Copy link
Contributor

info: The url return a wrong status code. Maybe the website is down for the moment.
info: [object Object]
(node:1001) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'link' of undefined
    at Object.stream (/home/runner/ahega0/node_modules/@justalk/anime-api/src/animeland/search.js:32:74)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Promise.all (index 0)
    at async Object.stream (/home/runner/ahega0/node_modules/@justalk/anime-api/src/index.js:35:13)
    at async Command.callback [as _callback] (/home/runner/ahega0/commands/ani.js:30:18)
(node:1001) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1001) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
info: The url return a wrong status code. Maybe the website is down for the moment.
info: [object Object]

Code I am calling:

const stream = await animeapi.stream('naruto shippuden', 387);

const embed = new MessageEmbed()
.setColor('#FFB6C1')
.setTitle(`Results for Naruto Shippuden | Episode 100`)
.setDescription(stream);
@ABDERRAHMANE-OUALI
Copy link

ABDERRAHMANE-OUALI commented May 23, 2021

I has a sumilar issue

info: The url return a wrong status code. Maybe the website is down for the moment.
info: [object Object]
TypeError: Cannot read property 'link' of undefined
    at Object.stream (/home/andruxuis/Documents/Flutter/animecloud/functions/node_modules/@justalk/anime-api/src/chia-anime/search.js:28:63)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Object.download (/home/andruxuis/Documents/Flutter/animecloud/functions/node_modules/@justalk/anime-api/src/chia-anime/search.js:42:25)
    at async Promise.all (index 0)
    at async Object.download (/home/andruxuis/Documents/Flutter/animecloud/functions/node_modules/@justalk/anime-api/src/index.js:44:13)the code I'm using is:

const animeapi = require("@justalk/anime-api");

this is the code I wrote:


  const video = animeapi.download("black clover", 100);

  video
    .then((video) => console.log(video))
    .catch((error) => console.log(error));

@JustalK
Copy link
Owner

JustalK commented Jun 9, 2021

Welcome to this project,

I will look at it. The problem is some of those websites change quite often their dns origin, so it's a bit hard to keep up with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants