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

TypeError: apicalypse is not a function #27

Open
TheOddler opened this issue Aug 20, 2022 · 6 comments
Open

TypeError: apicalypse is not a function #27

TheOddler opened this issue Aug 20, 2022 · 6 comments

Comments

@TheOddler
Copy link

I'm getting the error TypeError: apicalypse is not a function.

My code is:

import apicalypse from 'apicalypse';

const response = await apicalypse()
    .fields(['name', 'cover', 'summary', 'first_release_date', 'rating', 'rating_count'])
    .limit(10)
    .sort('name', 'asc')
    .request('https://api.igdb.com/v4/games');
console.log(response.data);

What am I doing wrong?

@krazyjakee
Copy link
Contributor

Try this instead: https://github.com/twitchtv/igdb-api-node

@TheOddler
Copy link
Author

Sadly I'm getting the same error there :( Well, now I'm getting igdb is not a function.

@krazyjakee
Copy link
Contributor

Are you able to output what igdb is if it's not a function? I suspect there is some issue with your esmodule set up.

@zzk
Copy link

zzk commented Sep 5, 2022

According to this answer from SO you might try to use import { default as apicalypse } from 'apicalypse';

@hitraj47
Copy link

Getting the same issue, still no solution?

@aguilera51284
Copy link

aguilera51284 commented Oct 12, 2024

try with, this works for me in deno 2.0

import apicalypse from 'apicalypse';
await apicalypse.default()

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

5 participants