Closed vismodo closed 2 years ago
const { HenrikDevValorantAPI } = require('unofficial-valorant-api') const VAPI = new HenrikDevValorantAPI();
The code above throws an error
TypeError: HenrikDevValorantAPI is not a constructor`
How do I fix this?
Remove the curly braces from the import. You're using object destructuring where you don't need to be.
const HenrikDevValorantAPI = require('unofficial-valorant-api'); const VAPI = new HenrikDevValorantAPI();
The code above throws an error
How do I fix this?