We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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
The text was updated successfully, but these errors were encountered:
Your import seems not correct, Have you tried to import it like that :
const TwitchApi = require('node-twitch').default;
I tried to reproduce it and the .default fixed it. Hope it helps. I wish you an excellent day
Sorry, something went wrong.
No branches or pull requests
running with a typescript application
I get this error when the method gets called
The text was updated successfully, but these errors were encountered: