Skip to content

TypeError: TwitchApi is not a constructor #40

@SteeledSlagle13

Description

@SteeledSlagle13

running with a typescript application

"typescript": "^4.6.2"

import TwitchApi from 'node-twitch';
const twitch = new TwitchApi({
      client_id: environment.TWITCH_AUTH.client_id,
      client_secret: environment.TWITCH_AUTH.client_secret,
});
const user = await twitch.getUsers([name]);

I get this error when the method gets called

file:///F:/bot/src/commands/utility/twitch.command.ts:25
const twitch = new TwitchApi({
^
TypeError: TwitchApi is not a constructor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions