I want to get data from the twitter-API-client about the most recent 3 followers.
async function get_followers() {
const followers = await twitterClient.accountsAndUsers
.followersList({
count: 3,
});
console.log(followers);
}
// call function
get_followers();
Packages are installed properly. But it's showing an error
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^
[UnhandledPromiseRejection: 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(). The promise rejected with the reason "#<Object>".] {
code: 'ERR_UNHANDLED_REJECTION'
}
I am using node v 8.12.1